aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-08-09 14:29:36 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-09 18:52:05 +0000
commit175af0d01177fc6e5a81e979cd2ae3009c375940 (patch)
tree9b2ef3150a60da2d42101c4c805252e4254b3533 /tests
parenta07e4302cfefc282d8d235edfbc20a54c75afa88 (diff)
GrContext::dump that produces JSON formatted output
Includes caps, GL strings, and extensions Bug: skia: Change-Id: I1e8b3dd50fb68357f9de8ca6149cf65443d027ef Reviewed-on: https://skia-review.googlesource.com/32340 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/GrContextFactoryTest.cpp6
-rw-r--r--tests/GrDrawTargetTest.cpp23
2 files changed, 6 insertions, 23 deletions
diff --git a/tests/GrContextFactoryTest.cpp b/tests/GrContextFactoryTest.cpp
index d4d5667152..098b2d61a9 100644
--- a/tests/GrContextFactoryTest.cpp
+++ b/tests/GrContextFactoryTest.cpp
@@ -139,4 +139,10 @@ DEF_GPUTEST(GrContextFactory_sharedContexts, reporter, /*factory*/) {
}
}
+DEF_GPUTEST_FOR_ALL_CONTEXTS(GrContextDump, reporter, ctxInfo) {
+ // Ensure that GrContext::dump doesn't assert (which is possible, if the JSON code is wrong)
+ SkString result = ctxInfo.grContext()->dump();
+ REPORTER_ASSERT(reporter, !result.isEmpty());
+}
+
#endif
diff --git a/tests/GrDrawTargetTest.cpp b/tests/GrDrawTargetTest.cpp
deleted file mode 100644
index c8492bc3ad..0000000000
--- a/tests/GrDrawTargetTest.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2013 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "Test.h"
-#if SK_SUPPORT_GPU
-
-#include "GrCaps.h"
-#include "GrContext.h"
-#include "GrGpu.h"
-
-DEF_GPUTEST_FOR_ALL_CONTEXTS(GrDrawTargetPrint, reporter, ctxInfo) {
- // This used to assert.
- SkString result = ctxInfo.grContext()->caps()->dump();
- SkASSERT(!result.isEmpty());
- SkString shaderResult = ctxInfo.grContext()->caps()->shaderCaps()->dump();
- SkASSERT(!shaderResult.isEmpty());
-}
-
-#endif