diff options
author | sky <sky@chromium.org> | 2016-03-21 09:38:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-21 16:39:48 +0000 |
commit | 6e47685c9153b1d26ce5d2f955ebd6aea67e09d3 (patch) | |
tree | 241778bc6054cecdaf714078fdc76b853bc20ae2 /mojo/shell/background/tests | |
parent | ae7184b6f12adfa37ecca0fbae511aa68fa080e6 (diff) | |
download | chromium_src-6e47685c9153b1d26ce5d2f955ebd6aea67e09d3.zip chromium_src-6e47685c9153b1d26ce5d2f955ebd6aea67e09d3.tar.gz chromium_src-6e47685c9153b1d26ce5d2f955ebd6aea67e09d3.tar.bz2 |
Adds option to run browser tests in mash
At a high level this is what the code does:
. The test launcher creates MojoTestConnector.
. MojoTestConnector creates a BackgroundShell (initially I wanted to
run the shell on the same thread, but that is problematic because I
need to run a nested message loop at times, which the IO thread
doesn't support (the test launcher uses an io thread)).
. A connection is established to mojo:mash_shell.
. MojoTestConnector sets up the state for each test. The connect is not done
with Mojo's child process connection. The base test launching code handles
the actual process launching.
Other random notes:
. --single_process is a slightly different flow.
. The test never finishes. This is because apps that are started don't
all exit when the shell exits. I'm going to look at that next.
R=ben@chromium.org, jam@chromium.org
BUG=581733
Review URL: https://codereview.chromium.org/1806353003
Cr-Commit-Position: refs/heads/master@{#382305}
Diffstat (limited to 'mojo/shell/background/tests')
-rw-r--r-- | mojo/shell/background/tests/test_catalog_store.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/mojo/shell/background/tests/test_catalog_store.cc b/mojo/shell/background/tests/test_catalog_store.cc index 32a1aa4..41daf82 100644 --- a/mojo/shell/background/tests/test_catalog_store.cc +++ b/mojo/shell/background/tests/test_catalog_store.cc @@ -28,14 +28,20 @@ scoped_ptr<base::DictionaryValue> BuildPermissiveSerializedAppInfo( scoped_ptr<base::DictionaryValue> app(new base::DictionaryValue); app->SetString(Store::kNameKey, name); app->SetString(Store::kDisplayNameKey, display_name); + app->SetInteger(Store::kManifestVersionKey, 1); scoped_ptr<base::DictionaryValue> capabilities(new base::DictionaryValue); - scoped_ptr<base::ListValue> interfaces(new base::ListValue); - interfaces->AppendString("*"); - capabilities->Set("*", std::move(interfaces)); - + scoped_ptr<base::DictionaryValue> required_capabilities( + new base::DictionaryValue); + scoped_ptr<base::DictionaryValue> interfaces_dictionary( + new base::DictionaryValue); + scoped_ptr<base::ListValue> interfaces_list(new base::ListValue); + interfaces_list->AppendString("*"); + interfaces_dictionary->Set("interfaces", std::move(interfaces_list)); + required_capabilities->Set("*", std::move(interfaces_dictionary)); + capabilities->Set(Store::kCapabilities_RequiredKey, + std::move(required_capabilities)); app->Set(Store::kCapabilitiesKey, std::move(capabilities)); - return app; } |