Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(676)

Unified Diff: sky/viewer/internals.cc

Issue 866653002: Don't try to GetPixelsForTesting if not testing (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/internals.cc
diff --git a/sky/viewer/internals.cc b/sky/viewer/internals.cc
index 5edf79affc691598f4274f8550c0ada50d0d28a1..01cf5db3bf5566ddbd033d531033b29649eb2030 100644
--- a/sky/viewer/internals.cc
+++ b/sky/viewer/internals.cc
@@ -14,6 +14,7 @@
#include "sky/engine/public/web/WebFrame.h"
#include "sky/engine/public/web/WebView.h"
#include "sky/viewer/document_view.h"
+#include "sky/viewer/runtime_flags.h"
#include "v8/include/v8.h"
#include <limits>
@@ -72,6 +73,8 @@ std::string Internals::ContentAsText() {
}
void Internals::NotifyTestComplete(const std::string& test_result) {
+ if (!RuntimeFlags::Get().testing())
+ return;
std::vector<unsigned char> pixels;
document_view_->GetPixelsForTesting(&pixels);
test_harness_->OnTestComplete(test_result,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698