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

Unified Diff: sky/shell/linux/main.cc

Issue 1215953006: Use sky_shell instead of mojo_shell for testing. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Foo Created 5 years, 5 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
Index: sky/shell/linux/main.cc
diff --git a/sky/shell/linux/main.cc b/sky/shell/linux/main.cc
index d04d290d0b3149c88f11875faa12f70f378d4500..0ed81d3fc4fe8f2d554947733e740b065508209f 100644
--- a/sky/shell/linux/main.cc
+++ b/sky/shell/linux/main.cc
@@ -11,6 +11,7 @@
#include "base/i18n/icu_util.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
+#include "sky/engine/public/web/WebRuntimeFeatures.h"
#include "sky/shell/platform_view.h"
#include "sky/shell/service_provider.h"
#include "sky/shell/shell.h"
@@ -24,15 +25,20 @@ namespace {
void Usage() {
std::cerr << "Usage: sky_shell"
+ << " --" << switches::kNonInteractive
<< " --" << switches::kPackageRoot << "=PACKAGE_ROOT"
<< " [ MAIN_DART ]" << std::endl;
}
void Init() {
+ base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess();
+ blink::WebRuntimeFeatures::enableObservatory(
+ !command_line.HasSwitch(switches::kNonInteractive));
+
Shell::Init(make_scoped_ptr(new ServiceProviderContext(
base::MessageLoop::current()->task_runner())));
-
- base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess();
+ // Explicitly boot the shared test runner.
+ TestRunner& runner = TestRunner::Shared();
std::string package_root =
command_line.GetSwitchValueASCII(switches::kPackageRoot);
@@ -42,8 +48,8 @@ void Init() {
if (!args.empty())
main = args[0];
- TestRunner::Shared().set_package_root(package_root);
- TestRunner::Shared().Start(main);
+ runner.set_package_root(package_root);
+ runner.Start(main);
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698