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

Unified Diff: components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc

Issue 2019013002: mus: Send display-id to client only for the root windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: doc Created 4 years, 7 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: components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
diff --git a/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc b/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
index d93f194bd79fc3348fcab3c7af40d3a1003fc320..9e299e128e1e52d5170bc6721570cfe079b9cf75 100644
--- a/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
+++ b/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
@@ -733,9 +733,9 @@ TEST_F(WindowTreeClientImplTest, NewTopLevelWindow) {
mojom::WindowDataPtr data = mojom::WindowData::New();
data->window_id = server_id(root2);
- data->display_id = 1;
+ const int64_t display_id = 1;
setup.window_tree_client()->OnTopLevelCreated(change_id, std::move(data),
- false);
+ display_id, false);
EXPECT_FALSE(WindowPrivate(root2).parent_drawn());
@@ -767,11 +767,11 @@ TEST_F(WindowTreeClientImplTest, NewTopLevelWindowGetsPropertiesFromData) {
mojom::WindowDataPtr data = mojom::WindowData::New();
data->window_id = server_id(root2);
- data->display_id = 1;
data->bounds = mojo::Rect::From(gfx::Rect(1, 2, 3, 4));
data->visible = true;
+ const int64_t display_id = 1;
setup.window_tree_client()->OnTopLevelCreated(change_id, std::move(data),
- true);
+ display_id, true);
// Make sure all the properties took.
EXPECT_TRUE(root2->IsDrawn());
@@ -825,12 +825,12 @@ TEST_F(WindowTreeClientImplTest, NewTopLevelWindowGetsAllChangesInFlight) {
mojom::WindowDataPtr data = mojom::WindowData::New();
data->window_id = server_id(root2);
data->bounds = mojo::Rect::From(gfx::Rect(1, 2, 3, 4));
- data->display_id = 1;
data->visible = true;
data->properties["xx"] = mojo::Array<uint8_t>::From(std::string("server_xx"));
data->properties["yy"] = mojo::Array<uint8_t>::From(std::string("server_yy"));
- setup.window_tree_client()->OnTopLevelCreated(new_window_in_flight_change_id,
- std::move(data), true);
+ const int64_t display_id = 1;
+ setup.window_tree_client()->OnTopLevelCreated(
+ new_window_in_flight_change_id, std::move(data), display_id, true);
// The only value that should take effect is the property for 'yy' as it was
// not in flight.
@@ -896,15 +896,15 @@ TEST_F(WindowTreeClientImplTest, TopLevelWindowDestroyedBeforeCreateComplete) {
mojom::WindowDataPtr data = mojom::WindowData::New();
data->window_id = server_id(root2);
- data->display_id = 1;
// Destroy the window before the server has a chance to ack the window
// creation.
root2->Destroy();
EXPECT_EQ(1u, setup.window_tree_connection()->GetRoots().size());
+ const int64_t display_id = 1;
setup.window_tree_client()->OnTopLevelCreated(change_id, std::move(data),
- true);
+ display_id, true);
EXPECT_EQ(1u, setup.window_tree_connection()->GetRoots().size());
}
« no previous file with comments | « components/mus/public/cpp/tests/window_tree_client_impl_private.cc ('k') | components/mus/public/interfaces/window_tree.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698