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, |