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

Unified Diff: services/ui/ws/window_tree_unittest.cc

Issue 2764433003: mus-ws: Plumb FrameSinkId to Children (Closed)
Patch Set: Addressed Antoine's comment Created 3 years, 9 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 | « services/ui/ws/window_tree_client_unittest.cc ('k') | ui/aura/mus/mus_context_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_tree_unittest.cc
diff --git a/services/ui/ws/window_tree_unittest.cc b/services/ui/ws/window_tree_unittest.cc
index 87f4bd0bab9c81bd4b3e9c4b041b66f5a63b4049..be17bc3823b1cd40009b3c4ec21c2648b634a0bf 100644
--- a/services/ui/ws/window_tree_unittest.cc
+++ b/services/ui/ws/window_tree_unittest.cc
@@ -701,18 +701,24 @@ TEST_F(WindowTreeTest, NewTopLevelWindow) {
static_cast<mojom::WindowManagerClient*>(wm_tree())
->OnWmCreatedTopLevelWindow(wm_change_id, embed_window_id2.id);
EXPECT_FALSE(child_binding->is_paused());
- EXPECT_EQ("TopLevelCreated id=17 window_id=" +
- WindowIdToString(
- WindowIdFromTransportId(embed_window_id2_in_child.id)) +
- " drawn=true",
- SingleChangeToDescription(
- *child_binding->client()->tracker()->changes()));
+ ServerWindow* embed_window = wm_tree()->GetWindowByClientId(embed_window_id2);
+ ASSERT_TRUE(embed_window);
+ // TODO(fsamuel): Currently the FrameSinkId maps directly to the server's
+ // window ID. This is likely bad from a security perspective and should be
+ // fixed.
+ EXPECT_EQ(
+ base::StringPrintf(
+ "TopLevelCreated id=17 FrameSinkId(%d, 0) window_id=%s drawn=true",
+ WindowIdToTransportId(embed_window->id()),
+ WindowIdToString(
+ WindowIdFromTransportId(embed_window_id2_in_child.id))
+ .c_str()),
+ SingleChangeToDescription(
+ *child_binding->client()->tracker()->changes()));
child_binding->client()->tracker()->changes()->clear();
// Change the visibility of the window from the owner and make sure the
// client sees the right id.
- ServerWindow* embed_window = wm_tree()->GetWindowByClientId(embed_window_id2);
- ASSERT_TRUE(embed_window);
EXPECT_TRUE(embed_window->visible());
ASSERT_TRUE(wm_tree()->SetWindowVisibility(
ClientWindowIdForWindow(wm_tree(), embed_window), false));
« no previous file with comments | « services/ui/ws/window_tree_client_unittest.cc ('k') | ui/aura/mus/mus_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698