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

Unified Diff: components/mus/ws/window_tree_apptest.cc

Issue 1725353003: Eliminate mojo::Shell client lib class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@15connector
Patch Set: . Created 4 years, 10 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
« no previous file with comments | « components/mus/ws/window_manager_client_apptest.cc ('k') | components/mus/ws/window_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/window_tree_apptest.cc
diff --git a/components/mus/ws/window_tree_apptest.cc b/components/mus/ws/window_tree_apptest.cc
index ee2a186ae27610aa4ee3b763925538d5b54bdb00..cc18e0d6ca63b54ca7a182348944355d5af1fab2 100644
--- a/components/mus/ws/window_tree_apptest.cc
+++ b/components/mus/ws/window_tree_apptest.cc
@@ -63,7 +63,7 @@ void EmbedCallbackImpl(base::RunLoop* run_loop,
// -----------------------------------------------------------------------------
-bool EmbedUrl(mojo::Shell* shell,
+bool EmbedUrl(mojo::Connector* connector,
WindowTree* ws,
const String& url,
Id root_id) {
@@ -71,7 +71,7 @@ bool EmbedUrl(mojo::Shell* shell,
base::RunLoop run_loop;
{
mojom::WindowTreeClientPtr client;
- shell->ConnectToInterface(url.get(), &client);
+ connector->ConnectToInterface(url.get(), &client);
ws->Embed(root_id, std::move(client),
mojom::WindowTree::kAccessPolicyDefault,
base::Bind(&EmbedCallbackImpl, &run_loop, &result));
@@ -547,7 +547,7 @@ class WindowTreeAppTest : public mojo::test::ApplicationTestBase,
Id root_id,
uint32_t policy_bitmask,
int* connection_id) {
- if (!EmbedUrl(shell(), owner, shell_url(), root_id)) {
+ if (!EmbedUrl(connector(), owner, test_url(), root_id)) {
ADD_FAILURE() << "Embed() failed";
return nullptr;
}
@@ -573,7 +573,7 @@ class WindowTreeAppTest : public mojo::test::ApplicationTestBase,
client_factory_.reset(new WindowTreeClientFactory());
mojom::WindowTreeHostFactoryPtr factory;
- shell()->ConnectToInterface("mojo:mus", &factory);
+ connector()->ConnectToInterface("mojo:mus", &factory);
mojom::WindowTreeClientPtr tree_client_ptr;
ws_client1_.reset(new TestWindowTreeClientImpl());
@@ -1724,7 +1724,7 @@ TEST_F(WindowTreeAppTest, EmbedFailsFromOtherConnection) {
// 2 should not be able to embed in window_3_3 as window_3_3 was not created
// by
// 2.
- EXPECT_FALSE(EmbedUrl(shell(), ws2(), shell_url(), window_3_3));
+ EXPECT_FALSE(EmbedUrl(connector(), ws2(), test_url(), window_3_3));
}
// Verifies Embed() from window manager on another connections window works.
@@ -1747,7 +1747,7 @@ TEST_F(WindowTreeAppTest, EmbedFromOtherConnection) {
TEST_F(WindowTreeAppTest, CantEmbedFromConnectionRoot) {
// Shouldn't be able to embed into the root.
- ASSERT_FALSE(EmbedUrl(shell(), ws1(), shell_url(), root_window_id()));
+ ASSERT_FALSE(EmbedUrl(connector(), ws1(), test_url(), root_window_id()));
// Even though the call above failed a WindowTreeClient was obtained. We need
// to
@@ -1756,7 +1756,7 @@ TEST_F(WindowTreeAppTest, CantEmbedFromConnectionRoot) {
// Don't allow a connection to embed into its own root.
ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(true));
- EXPECT_FALSE(EmbedUrl(shell(), ws2(), shell_url(),
+ EXPECT_FALSE(EmbedUrl(connector(), ws2(), test_url(),
BuildWindowId(connection_id_1(), 1)));
// Need to wait for a WindowTreeClient for same reason as above.
@@ -1773,7 +1773,7 @@ TEST_F(WindowTreeAppTest, CantEmbedFromConnectionRoot) {
// window_1_2 is ws3's root, so even though v3 is an embed root it should not
// be able to Embed into itself.
- ASSERT_FALSE(EmbedUrl(shell(), ws3(), shell_url(), window_1_2));
+ ASSERT_FALSE(EmbedUrl(connector(), ws3(), test_url(), window_1_2));
}
// Verifies that a transient window tracks its parent's lifetime.
« no previous file with comments | « components/mus/ws/window_manager_client_apptest.cc ('k') | components/mus/ws/window_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698