diff options
author | erg <erg@chromium.org> | 2016-03-18 11:30:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-18 18:31:56 +0000 |
commit | 716b6174dbd421bbec303657fdbf29069fe46ada (patch) | |
tree | fc2f1c6de25c3d8ddf9939e13ede80df104ce4a6 /mojo | |
parent | d029a988f4c493a6df894c68d7fcd41ae160af31 (diff) | |
download | chromium_src-716b6174dbd421bbec303657fdbf29069fe46ada.zip chromium_src-716b6174dbd421bbec303657fdbf29069fe46ada.tar.gz chromium_src-716b6174dbd421bbec303657fdbf29069fe46ada.tar.bz2 |
Convert filesystem_apptests to shelltests.
BUG=594730
Review URL: https://codereview.chromium.org/1814983002
Cr-Commit-Position: refs/heads/master@{#382021}
Diffstat (limited to 'mojo')
-rw-r--r-- | mojo/shell/public/cpp/lib/shell_test.cc | 12 | ||||
-rw-r--r-- | mojo/shell/public/cpp/shell_test.h | 2 | ||||
-rw-r--r-- | mojo/tools/data/apptests | 4 |
3 files changed, 14 insertions, 4 deletions
diff --git a/mojo/shell/public/cpp/lib/shell_test.cc b/mojo/shell/public/cpp/lib/shell_test.cc index e5cb3c2..605e7c5 100644 --- a/mojo/shell/public/cpp/lib/shell_test.cc +++ b/mojo/shell/public/cpp/lib/shell_test.cc @@ -5,6 +5,7 @@ #include "mojo/shell/public/cpp/shell_test.h" #include "base/message_loop/message_loop.h" +#include "base/run_loop.h" #include "mojo/shell/background/background_shell.h" #include "mojo/shell/public/cpp/shell_client.h" @@ -44,6 +45,7 @@ void ShellTest::InitializeCalled(Connector* connector, initialize_name_ = name; initialize_instance_id_ = id; initialize_userid_ = user_id; + initialize_called_.Run(); } void ShellTest::SetUp() { @@ -51,10 +53,20 @@ void ShellTest::SetUp() { message_loop_ = CreateMessageLoop(); background_shell_.reset(new shell::BackgroundShell); background_shell_->Init(nullptr); + + // Create the shell connection. We don't proceed until we get our + // ShellClient's Initialize() method is called. + base::RunLoop run_loop; + base::MessageLoop::ScopedNestableTaskAllower allow( + base::MessageLoop::current()); + initialize_called_ = run_loop.QuitClosure(); + shell_connection_.reset(new ShellConnection( shell_client_.get(), background_shell_->CreateShellClientRequest(test_name_))); connector_ = shell_connection_->connector(); + + run_loop.Run(); } void ShellTest::TearDown() { diff --git a/mojo/shell/public/cpp/shell_test.h b/mojo/shell/public/cpp/shell_test.h index ee85d12..3c8e3d8 100644 --- a/mojo/shell/public/cpp/shell_test.h +++ b/mojo/shell/public/cpp/shell_test.h @@ -100,6 +100,8 @@ class ShellTest : public testing::Test { std::string initialize_userid_ = shell::mojom::kInheritUserID; uint32_t initialize_instance_id_ = shell::mojom::kInvalidInstanceID; + base::Closure initialize_called_; + DISALLOW_COPY_AND_ASSIGN(ShellTest); }; diff --git a/mojo/tools/data/apptests b/mojo/tools/data/apptests index 6ffff1e..8e07e4e 100644 --- a/mojo/tools/data/apptests +++ b/mojo/tools/data/apptests @@ -39,10 +39,6 @@ tests = [ if config.target_os != config.OS_ANDROID: tests += [ { - 'test': 'mojo:filesystem_apptests', - 'type': 'gtest_isolated', - }, - { 'test': 'mojo:mash_wm_apptests', 'type': 'gtest_isolated', 'args': ['--use-x11-test-config', |