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

Unified Diff: sky/viewer/viewer.cc

Issue 797063002: Make reftests work for sky. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: cleanup Created 6 years 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
« sky/tools/tester/tester.cc ('K') | « sky/viewer/internals.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/viewer.cc
diff --git a/sky/viewer/viewer.cc b/sky/viewer/viewer.cc
index eb5b6d0fba31b3bb14f243cf89fbfd4146359401..26a070f783d8ba0a8a885314abef23afcdc5d53c 100644
--- a/sky/viewer/viewer.cc
+++ b/sky/viewer/viewer.cc
@@ -24,6 +24,9 @@
namespace sky {
+// Load the viewer in testing mode so we can dump pixels.
+const char kTesting[] = "--testing";
+
class Viewer : public mojo::ApplicationDelegate,
public mojo::InterfaceFactory<mojo::ContentHandler> {
public:
@@ -34,6 +37,8 @@ class Viewer : public mojo::ApplicationDelegate,
private:
// Overridden from ApplicationDelegate:
virtual void Initialize(mojo::ApplicationImpl* app) override {
+ is_testing_ = app->HasArg(kTesting);
+
platform_impl_.reset(new PlatformImpl(app));
blink::initialize(platform_impl_.get());
base::i18n::InitializeICU();
@@ -50,10 +55,11 @@ class Viewer : public mojo::ApplicationDelegate,
// Overridden from InterfaceFactory<ContentHandler>
virtual void Create(mojo::ApplicationConnection* connection,
mojo::InterfaceRequest<mojo::ContentHandler> request) override {
- mojo::BindToRequest(new ContentHandlerImpl(), &request);
+ mojo::BindToRequest(new ContentHandlerImpl(is_testing_), &request);
}
scoped_ptr<PlatformImpl> platform_impl_;
+ bool is_testing_;
DISALLOW_COPY_AND_ASSIGN(Viewer);
};
« sky/tools/tester/tester.cc ('K') | « sky/viewer/internals.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698