diff options
author | bsalomon <bsalomon@google.com> | 2016-05-11 10:38:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-11 10:38:06 -0700 |
commit | 0fd3c818612376afd54bad66d519feb7505b5d52 (patch) | |
tree | 1aeef7a524ccfd2abad35945cdbc2cffdfc925e8 /tests/GrContextFactoryTest.cpp | |
parent | 6a51491b2491a646f2e378ccbae301136b6ec215 (diff) |
Make unit tests use generic testcontext rather than glcontext
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1971613003
Review-Url: https://codereview.chromium.org/1971613003
Diffstat (limited to 'tests/GrContextFactoryTest.cpp')
-rw-r--r-- | tests/GrContextFactoryTest.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/GrContextFactoryTest.cpp b/tests/GrContextFactoryTest.cpp index e710ca4867..3b12b832da 100644 --- a/tests/GrContextFactoryTest.cpp +++ b/tests/GrContextFactoryTest.cpp @@ -78,9 +78,7 @@ DEF_GPUTEST(GrContextFactory_abandon, reporter, /*factory*/) { if (!info1.grContext()) { continue; } - if (GrContextFactory::ContextTypeBackend(ctxType) == kOpenGL_GrBackend) { - REPORTER_ASSERT(reporter, info1.glContext()); - } + REPORTER_ASSERT(reporter, info1.testContext()); // Ref for comparison. The API does not explicitly say that this stays alive. info1.grContext()->ref(); testFactory.abandonContexts(); @@ -88,9 +86,8 @@ DEF_GPUTEST(GrContextFactory_abandon, reporter, /*factory*/) { // Test that we get different context after abandon. ContextInfo info2 = testFactory.getContextInfo(ctxType); REPORTER_ASSERT(reporter, info2.grContext()); - if (GrContextFactory::ContextTypeBackend(ctxType) == kOpenGL_GrBackend) { - REPORTER_ASSERT(reporter, info2.glContext()); - } + REPORTER_ASSERT(reporter, info2.testContext()); + REPORTER_ASSERT(reporter, info1.grContext() != info2.grContext()); // The GL context should also change, but it also could get the same address. |