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

Side by Side Diff: services/ui/ws/window_tree_unittest.cc

Issue 2886873002: Only send the FrameSinkId to client when it is necessary (Closed)
Patch Set: Address review issues. Created 3 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/ui/ws/window_tree.h" 5 #include "services/ui/ws/window_tree.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 "OnFrameSinkIdAllocated window=%s %s", 752 "OnFrameSinkIdAllocated window=%s %s",
753 WindowIdToString(WindowIdFromTransportId(embed_window_id2.id)) 753 WindowIdToString(WindowIdFromTransportId(embed_window_id2.id))
754 .c_str(), 754 .c_str(),
755 embed_window->frame_sink_id().ToString().c_str()), 755 embed_window->frame_sink_id().ToString().c_str()),
756 SingleChangeToDescription(*wm_client()->tracker()->changes())); 756 SingleChangeToDescription(*wm_client()->tracker()->changes()));
757 EXPECT_FALSE(child_binding->is_paused()); 757 EXPECT_FALSE(child_binding->is_paused());
758 // TODO(fsamuel): Currently the FrameSinkId maps directly to the server's 758 // TODO(fsamuel): Currently the FrameSinkId maps directly to the server's
759 // window ID. This is likely bad from a security perspective and should be 759 // window ID. This is likely bad from a security perspective and should be
760 // fixed. 760 // fixed.
761 EXPECT_EQ( 761 EXPECT_EQ(
762 base::StringPrintf( 762 base::StringPrintf("TopLevelCreated id=17 window_id=%s drawn=true",
763 "TopLevelCreated id=17 FrameSinkId(%d, 0) window_id=%s drawn=true", 763 WindowIdToString(WindowIdFromTransportId(
764 WindowIdToTransportId(embed_window->id()), 764 embed_window_id2_in_child.id))
765 WindowIdToString( 765 .c_str()),
766 WindowIdFromTransportId(embed_window_id2_in_child.id))
767 .c_str()),
768 SingleChangeToDescription( 766 SingleChangeToDescription(
769 *child_binding->client()->tracker()->changes())); 767 *child_binding->client()->tracker()->changes()));
770 child_binding->client()->tracker()->changes()->clear(); 768 child_binding->client()->tracker()->changes()->clear();
771 769
772 // Change the visibility of the window from the owner and make sure the 770 // Change the visibility of the window from the owner and make sure the
773 // client sees the right id. 771 // client sees the right id.
774 EXPECT_TRUE(embed_window->visible()); 772 EXPECT_TRUE(embed_window->visible());
775 ASSERT_TRUE(wm_tree()->SetWindowVisibility( 773 ASSERT_TRUE(wm_tree()->SetWindowVisibility(
776 ClientWindowIdForWindow(wm_tree(), embed_window), false)); 774 ClientWindowIdForWindow(wm_tree(), embed_window), false));
777 EXPECT_FALSE(embed_window->visible()); 775 EXPECT_FALSE(embed_window->visible());
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 EXPECT_TRUE(window_manager_tree->DeleteWindow(display_root_id)); 1589 EXPECT_TRUE(window_manager_tree->DeleteWindow(display_root_id));
1592 EXPECT_TRUE(window_manager_tree->roots().empty()); 1590 EXPECT_TRUE(window_manager_tree->roots().empty());
1593 EXPECT_TRUE(WindowManagerStateTestApi(window_manager_state) 1591 EXPECT_TRUE(WindowManagerStateTestApi(window_manager_state)
1594 .window_manager_display_roots() 1592 .window_manager_display_roots()
1595 .empty()); 1593 .empty());
1596 } 1594 }
1597 1595
1598 } // namespace test 1596 } // namespace test
1599 } // namespace ws 1597 } // namespace ws
1600 } // namespace ui 1598 } // namespace ui
OLDNEW
« 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