| OLD | NEW |
| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 void WindowTreeResultCallback(base::RunLoop* run_loop, | 51 void WindowTreeResultCallback(base::RunLoop* run_loop, |
| 52 std::vector<TestWindow>* windows, | 52 std::vector<TestWindow>* windows, |
| 53 Array<WindowDataPtr> results) { | 53 Array<WindowDataPtr> results) { |
| 54 WindowDatasToTestWindows(results, windows); | 54 WindowDatasToTestWindows(results, windows); |
| 55 run_loop->Quit(); | 55 run_loop->Quit(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void EmbedCallbackImpl(base::RunLoop* run_loop, | 58 void EmbedCallbackImpl(base::RunLoop* run_loop, |
| 59 bool* result_cache, | 59 bool* result_cache, |
| 60 bool result, | 60 bool result) { |
| 61 ConnectionSpecificId connection_id) { | |
| 62 *result_cache = result; | 61 *result_cache = result; |
| 63 run_loop->Quit(); | 62 run_loop->Quit(); |
| 64 } | 63 } |
| 65 | 64 |
| 66 // ----------------------------------------------------------------------------- | 65 // ----------------------------------------------------------------------------- |
| 67 | 66 |
| 68 bool EmbedUrl(mojo::Connector* connector, | 67 bool EmbedUrl(mojo::Connector* connector, |
| 69 WindowTree* tree, | 68 WindowTree* tree, |
| 70 const String& url, | 69 const String& url, |
| 71 Id root_id) { | 70 Id root_id) { |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 if (wait_state_.get() && | 268 if (wait_state_.get() && |
| 270 tracker_.changes()->size() >= wait_state_->change_count) { | 269 tracker_.changes()->size() >= wait_state_->change_count) { |
| 271 wait_state_->run_loop.Quit(); | 270 wait_state_->run_loop.Quit(); |
| 272 } | 271 } |
| 273 } | 272 } |
| 274 | 273 |
| 275 // WindowTreeClient: | 274 // WindowTreeClient: |
| 276 void OnEmbed(ConnectionSpecificId connection_id, | 275 void OnEmbed(ConnectionSpecificId connection_id, |
| 277 WindowDataPtr root, | 276 WindowDataPtr root, |
| 278 mojom::WindowTreePtr tree, | 277 mojom::WindowTreePtr tree, |
| 279 Id focused_window_id, | 278 Id focused_window_id) override { |
| 280 uint32_t access_policy) override { | |
| 281 // TODO(sky): add coverage of |focused_window_id|. | 279 // TODO(sky): add coverage of |focused_window_id|. |
| 282 ASSERT_TRUE(root); | 280 ASSERT_TRUE(root); |
| 283 root_window_id_ = root->window_id; | 281 root_window_id_ = root->window_id; |
| 284 tree_ = std::move(tree); | 282 tree_ = std::move(tree); |
| 285 connection_id_ = connection_id; | 283 connection_id_ = connection_id; |
| 286 tracker()->OnEmbed(connection_id, std::move(root)); | 284 tracker()->OnEmbed(connection_id, std::move(root)); |
| 287 if (embed_run_loop_) | 285 if (embed_run_loop_) |
| 288 embed_run_loop_->Quit(); | 286 embed_run_loop_->Quit(); |
| 289 } | 287 } |
| 290 void OnEmbeddedAppDisconnected(Id window_id) override { | 288 void OnEmbeddedAppDisconnected(Id window_id) override { |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 WindowTree* owner, | 536 WindowTree* owner, |
| 539 Id root_id, | 537 Id root_id, |
| 540 int* connection_id) { | 538 int* connection_id) { |
| 541 return EstablishConnectionViaEmbedWithPolicyBitmask(owner, root_id, | 539 return EstablishConnectionViaEmbedWithPolicyBitmask(owner, root_id, |
| 542 connection_id); | 540 connection_id); |
| 543 } | 541 } |
| 544 | 542 |
| 545 scoped_ptr<TestWindowTreeClientImpl> | 543 scoped_ptr<TestWindowTreeClientImpl> |
| 546 EstablishConnectionViaEmbedWithPolicyBitmask(WindowTree* owner, | 544 EstablishConnectionViaEmbedWithPolicyBitmask(WindowTree* owner, |
| 547 Id root_id, | 545 Id root_id, |
| 548 uint32_t policy_bitmask, | |
| 549 int* connection_id) { | 546 int* connection_id) { |
| 550 if (!EmbedUrl(connector(), owner, test_name(), root_id)) { | 547 if (!EmbedUrl(connector(), owner, test_name(), root_id)) { |
| 551 ADD_FAILURE() << "Embed() failed"; | 548 ADD_FAILURE() << "Embed() failed"; |
| 552 return nullptr; | 549 return nullptr; |
| 553 } | 550 } |
| 554 scoped_ptr<TestWindowTreeClientImpl> client = | 551 scoped_ptr<TestWindowTreeClientImpl> client = |
| 555 client_factory_->WaitForInstance(); | 552 client_factory_->WaitForInstance(); |
| 556 if (!client.get()) { | 553 if (!client.get()) { |
| 557 ADD_FAILURE() << "WaitForInstance failed"; | 554 ADD_FAILURE() << "WaitForInstance failed"; |
| 558 return nullptr; | 555 return nullptr; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 // And window 4 should not be visible to connection 3. | 687 // And window 4 should not be visible to connection 3. |
| 691 { | 688 { |
| 692 std::vector<TestWindow> windows; | 689 std::vector<TestWindow> windows; |
| 693 GetWindowTree(wt3(), window_2_3, &windows); | 690 GetWindowTree(wt3(), window_2_3, &windows); |
| 694 EXPECT_EQ("no windows", SingleWindowDescription(windows)); | 691 EXPECT_EQ("no windows", SingleWindowDescription(windows)); |
| 695 } | 692 } |
| 696 } | 693 } |
| 697 | 694 |
| 698 // Verifies once Embed() has been invoked the parent connection can't see any | 695 // Verifies once Embed() has been invoked the parent connection can't see any |
| 699 // children. | 696 // children. |
| 700 TEST_F(WindowTreeClientTest, CantAccessChildrenOfEmbeddedWindow) { | 697 TEST_F(WindowTreeClientTest, DISABLED_CantAccessChildrenOfEmbeddedWindow) { |
| 701 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(true)); | 698 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(true)); |
| 702 | 699 |
| 703 Id window_1_1 = BuildWindowId(connection_id_1(), 1); | 700 Id window_1_1 = BuildWindowId(connection_id_1(), 1); |
| 704 Id window_2_2 = wt_client2()->NewWindow(2); | 701 Id window_2_2 = wt_client2()->NewWindow(2); |
| 705 ASSERT_TRUE(window_2_2); | 702 ASSERT_TRUE(window_2_2); |
| 706 ASSERT_TRUE(wt_client2()->AddWindow(window_1_1, window_2_2)); | 703 ASSERT_TRUE(wt_client2()->AddWindow(window_1_1, window_2_2)); |
| 707 | 704 |
| 708 ASSERT_NO_FATAL_FAILURE(EstablishThirdConnection(wt2(), window_2_2)); | 705 ASSERT_NO_FATAL_FAILURE(EstablishThirdConnection(wt2(), window_2_2)); |
| 709 | 706 |
| 710 Id window_3_3 = wt_client3()->NewWindow(3); | 707 Id window_3_3 = wt_client3()->NewWindow(3); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 739 // but the ids are in the id space of client2, which is not the same as | 736 // but the ids are in the id space of client2, which is not the same as |
| 740 // the id space of wt1(). | 737 // the id space of wt1(). |
| 741 EXPECT_EQ("window=2,1 parent=1,1", windows[1].ToString()); | 738 EXPECT_EQ("window=2,1 parent=1,1", windows[1].ToString()); |
| 742 // Same thing here, we really want to test for | 739 // Same thing here, we really want to test for |
| 743 // WindowParentToString(window_3_3, window_2_2). | 740 // WindowParentToString(window_3_3, window_2_2). |
| 744 EXPECT_EQ("window=3,1 parent=2,1", windows[2].ToString()); | 741 EXPECT_EQ("window=3,1 parent=2,1", windows[2].ToString()); |
| 745 } | 742 } |
| 746 } | 743 } |
| 747 | 744 |
| 748 // Verifies once Embed() has been invoked the parent can't mutate the children. | 745 // Verifies once Embed() has been invoked the parent can't mutate the children. |
| 749 TEST_F(WindowTreeClientTest, CantModifyChildrenOfEmbeddedWindow) { | 746 TEST_F(WindowTreeClientTest, DISABLED_CantModifyChildrenOfEmbeddedWindow) { |
| 750 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(true)); | 747 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(true)); |
| 751 | 748 |
| 752 Id window_1_1 = BuildWindowId(connection_id_1(), 1); | 749 Id window_1_1 = BuildWindowId(connection_id_1(), 1); |
| 753 Id window_2_1 = wt_client2()->NewWindow(1); | 750 Id window_2_1 = wt_client2()->NewWindow(1); |
| 754 ASSERT_TRUE(window_2_1); | 751 ASSERT_TRUE(window_2_1); |
| 755 ASSERT_TRUE(wt_client2()->AddWindow(window_1_1, window_2_1)); | 752 ASSERT_TRUE(wt_client2()->AddWindow(window_1_1, window_2_1)); |
| 756 | 753 |
| 757 ASSERT_NO_FATAL_FAILURE(EstablishThirdConnection(wt2(), window_2_1)); | 754 ASSERT_NO_FATAL_FAILURE(EstablishThirdConnection(wt2(), window_2_1)); |
| 758 | 755 |
| 759 Id window_2_2 = wt_client2()->NewWindow(2); | 756 Id window_2_2 = wt_client2()->NewWindow(2); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(false)); | 813 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(false)); |
| 817 | 814 |
| 818 // Make 3 a child of 2. | 815 // Make 3 a child of 2. |
| 819 ASSERT_TRUE(wt_client1()->AddWindow(window_1_2, window_1_3)); | 816 ASSERT_TRUE(wt_client1()->AddWindow(window_1_2, window_1_3)); |
| 820 | 817 |
| 821 // Try to make 2 a child of 3, this should fail since 2 is an ancestor of 3. | 818 // Try to make 2 a child of 3, this should fail since 2 is an ancestor of 3. |
| 822 EXPECT_FALSE(wt_client1()->AddWindow(window_1_3, window_1_2)); | 819 EXPECT_FALSE(wt_client1()->AddWindow(window_1_3, window_1_2)); |
| 823 } | 820 } |
| 824 | 821 |
| 825 // Verifies adding to root sends right notifications. | 822 // Verifies adding to root sends right notifications. |
| 826 TEST_F(WindowTreeClientTest, AddToRoot) { | 823 TEST_F(WindowTreeClientTest, DISABLED_AddToRoot) { |
| 827 // Create the embed point now so that the ids line up. | 824 // Create the embed point now so that the ids line up. |
| 828 Id window_1_1 = wt_client1()->NewWindow(1); | 825 Id window_1_1 = wt_client1()->NewWindow(1); |
| 829 ASSERT_TRUE(window_1_1); | 826 ASSERT_TRUE(window_1_1); |
| 830 Id window_1_21 = wt_client1()->NewWindow(21); | 827 Id window_1_21 = wt_client1()->NewWindow(21); |
| 831 Id window_1_3 = wt_client1()->NewWindow(3); | 828 Id window_1_3 = wt_client1()->NewWindow(3); |
| 832 ASSERT_TRUE(window_1_21); | 829 ASSERT_TRUE(window_1_21); |
| 833 ASSERT_TRUE(window_1_3); | 830 ASSERT_TRUE(window_1_3); |
| 834 | 831 |
| 835 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(false)); | 832 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(false)); |
| 836 changes2()->clear(); | 833 changes2()->clear(); |
| 837 | 834 |
| 838 // Make 3 a child of 21. | 835 // Make 3 a child of 21. |
| 839 ASSERT_TRUE(wt_client1()->AddWindow(window_1_21, window_1_3)); | 836 ASSERT_TRUE(wt_client1()->AddWindow(window_1_21, window_1_3)); |
| 840 | 837 |
| 841 // Make 21 a child of 1. | 838 // Make 21 a child of 1. |
| 842 ASSERT_TRUE(wt_client1()->AddWindow(window_1_1, window_1_21)); | 839 ASSERT_TRUE(wt_client1()->AddWindow(window_1_1, window_1_21)); |
| 843 | 840 |
| 844 // Connection 2 should not be told anything (because the window is from a | 841 // Connection 2 should not be told anything (because the window is from a |
| 845 // different connection). Create a window to ensure we got a response from | 842 // different connection). Create a window to ensure we got a response from |
| 846 // the server. | 843 // the server. |
| 847 ASSERT_TRUE(wt_client2()->NewWindow(100)); | 844 ASSERT_TRUE(wt_client2()->NewWindow(100)); |
| 848 EXPECT_TRUE(changes2()->empty()); | 845 EXPECT_TRUE(changes2()->empty()); |
| 849 } | 846 } |
| 850 | 847 |
| 851 // Verifies HierarchyChanged is correctly sent for various adds/removes. | 848 // Verifies HierarchyChanged is correctly sent for various adds/removes. |
| 852 TEST_F(WindowTreeClientTest, WindowHierarchyChangedWindows) { | 849 TEST_F(WindowTreeClientTest, DISABLED_WindowHierarchyChangedWindows) { |
| 853 // Create the embed point now so that the ids line up. | 850 // Create the embed point now so that the ids line up. |
| 854 Id window_1_1 = wt_client1()->NewWindow(1); | 851 Id window_1_1 = wt_client1()->NewWindow(1); |
| 855 // 1,2->1,11. | 852 // 1,2->1,11. |
| 856 Id window_1_2 = wt_client1()->NewWindow(2); | 853 Id window_1_2 = wt_client1()->NewWindow(2); |
| 857 ASSERT_TRUE(window_1_2); | 854 ASSERT_TRUE(window_1_2); |
| 858 ASSERT_TRUE(wt_client1()->SetWindowVisibility(window_1_2, true)); | 855 ASSERT_TRUE(wt_client1()->SetWindowVisibility(window_1_2, true)); |
| 859 Id window_1_11 = wt_client1()->NewWindow(11); | 856 Id window_1_11 = wt_client1()->NewWindow(11); |
| 860 ASSERT_TRUE(window_1_11); | 857 ASSERT_TRUE(window_1_11); |
| 861 ASSERT_TRUE(wt_client1()->SetWindowVisibility(window_1_11, true)); | 858 ASSERT_TRUE(wt_client1()->SetWindowVisibility(window_1_11, true)); |
| 862 ASSERT_TRUE(wt_client1()->AddWindow(window_1_2, window_1_11)); | 859 ASSERT_TRUE(wt_client1()->AddWindow(window_1_2, window_1_11)); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 wt_client1_->WaitForChangeCount(1); | 1113 wt_client1_->WaitForChangeCount(1); |
| 1117 EXPECT_EQ("HierarchyChanged window=" + IdToString(window_2_1) + | 1114 EXPECT_EQ("HierarchyChanged window=" + IdToString(window_2_1) + |
| 1118 " new_parent=" + IdToString(window_1_1) + " old_parent=null", | 1115 " new_parent=" + IdToString(window_1_1) + " old_parent=null", |
| 1119 SingleChangeToDescription(*changes1())); | 1116 SingleChangeToDescription(*changes1())); |
| 1120 EXPECT_EQ("[" + WindowParentToString(window_2_1, window_1_1) + "]", | 1117 EXPECT_EQ("[" + WindowParentToString(window_2_1, window_1_1) + "]", |
| 1121 ChangeWindowDescription(*changes1())); | 1118 ChangeWindowDescription(*changes1())); |
| 1122 } | 1119 } |
| 1123 } | 1120 } |
| 1124 | 1121 |
| 1125 // Assertions for GetWindowTree. | 1122 // Assertions for GetWindowTree. |
| 1126 TEST_F(WindowTreeClientTest, GetWindowTree) { | 1123 TEST_F(WindowTreeClientTest, DISABLED_GetWindowTree) { |
| 1127 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(true)); | 1124 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(true)); |
| 1128 Id window_1_1 = BuildWindowId(connection_id_1(), 1); | 1125 Id window_1_1 = BuildWindowId(connection_id_1(), 1); |
| 1129 | 1126 |
| 1130 // Create 11 in first connection and make it a child of 1. | 1127 // Create 11 in first connection and make it a child of 1. |
| 1131 Id window_1_11 = wt_client1()->NewWindow(11); | 1128 Id window_1_11 = wt_client1()->NewWindow(11); |
| 1132 ASSERT_TRUE(window_1_11); | 1129 ASSERT_TRUE(window_1_11); |
| 1133 ASSERT_TRUE(wt_client1()->AddWindow(root_window_id(), window_1_1)); | 1130 ASSERT_TRUE(wt_client1()->AddWindow(root_window_id(), window_1_1)); |
| 1134 ASSERT_TRUE(wt_client1()->AddWindow(window_1_1, window_1_11)); | 1131 ASSERT_TRUE(wt_client1()->AddWindow(window_1_1, window_1_11)); |
| 1135 | 1132 |
| 1136 // Create two windows in second connection, 2 and 3, both children of 1. | 1133 // Create two windows in second connection, 2 and 3, both children of 1. |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1620 // Set back to null. | 1617 // Set back to null. |
| 1621 ASSERT_TRUE(wt_client1()->SetWindowProperty(window_1_1, "one", NULL)); | 1618 ASSERT_TRUE(wt_client1()->SetWindowProperty(window_1_1, "one", NULL)); |
| 1622 { | 1619 { |
| 1623 wt_client2_->WaitForChangeCount(1); | 1620 wt_client2_->WaitForChangeCount(1); |
| 1624 EXPECT_EQ("PropertyChanged window=" + IdToString(window_1_1) + | 1621 EXPECT_EQ("PropertyChanged window=" + IdToString(window_1_1) + |
| 1625 " key=one value=NULL", | 1622 " key=one value=NULL", |
| 1626 SingleChangeToDescription(*changes2())); | 1623 SingleChangeToDescription(*changes2())); |
| 1627 } | 1624 } |
| 1628 } | 1625 } |
| 1629 | 1626 |
| 1630 TEST_F(WindowTreeClientTest, OnEmbeddedAppDisconnected) { | 1627 TEST_F(WindowTreeClientTest, DISABLED_OnEmbeddedAppDisconnected) { |
| 1631 // Create connection 2 and 3. | 1628 // Create connection 2 and 3. |
| 1632 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(true)); | 1629 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(true)); |
| 1633 Id window_1_1 = BuildWindowId(connection_id_1(), 1); | 1630 Id window_1_1 = BuildWindowId(connection_id_1(), 1); |
| 1634 Id window_2_1 = wt_client2()->NewWindow(1); | 1631 Id window_2_1 = wt_client2()->NewWindow(1); |
| 1635 ASSERT_TRUE(window_2_1); | 1632 ASSERT_TRUE(window_2_1); |
| 1636 ASSERT_TRUE(wt_client2()->AddWindow(window_1_1, window_2_1)); | 1633 ASSERT_TRUE(wt_client2()->AddWindow(window_1_1, window_2_1)); |
| 1637 changes2()->clear(); | 1634 changes2()->clear(); |
| 1638 ASSERT_NO_FATAL_FAILURE(EstablishThirdConnection(wt2(), window_2_1)); | 1635 ASSERT_NO_FATAL_FAILURE(EstablishThirdConnection(wt2(), window_2_1)); |
| 1639 | 1636 |
| 1640 // Connection 1 should get a hierarchy change for window_2_1. | 1637 // Connection 1 should get a hierarchy change for window_2_1. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1700 TestWindowTreeClientImpl client2; | 1697 TestWindowTreeClientImpl client2; |
| 1701 mojom::WindowTreeClientPtr client2_ptr; | 1698 mojom::WindowTreeClientPtr client2_ptr; |
| 1702 mojo::Binding<WindowTreeClient> client2_binding(&client2, &client2_ptr); | 1699 mojo::Binding<WindowTreeClient> client2_binding(&client2, &client2_ptr); |
| 1703 ASSERT_TRUE(Embed(wt1(), BuildWindowId(connection_id_1(), 1), | 1700 ASSERT_TRUE(Embed(wt1(), BuildWindowId(connection_id_1(), 1), |
| 1704 std::move(client2_ptr))); | 1701 std::move(client2_ptr))); |
| 1705 client2.WaitForOnEmbed(); | 1702 client2.WaitForOnEmbed(); |
| 1706 EXPECT_EQ("OnEmbed", | 1703 EXPECT_EQ("OnEmbed", |
| 1707 SingleChangeToDescription(*client2.tracker()->changes())); | 1704 SingleChangeToDescription(*client2.tracker()->changes())); |
| 1708 } | 1705 } |
| 1709 | 1706 |
| 1710 TEST_F(WindowTreeClientTest, EmbedFailsFromOtherConnection) { | 1707 TEST_F(WindowTreeClientTest, DISABLED_EmbedFailsFromOtherConnection) { |
| 1711 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(true)); | 1708 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(true)); |
| 1712 | 1709 |
| 1713 Id window_1_1 = BuildWindowId(connection_id_1(), 1); | 1710 Id window_1_1 = BuildWindowId(connection_id_1(), 1); |
| 1714 Id window_2_1 = wt_client2()->NewWindow(1); | 1711 Id window_2_1 = wt_client2()->NewWindow(1); |
| 1715 ASSERT_TRUE(window_2_1); | 1712 ASSERT_TRUE(window_2_1); |
| 1716 ASSERT_TRUE(wt_client2()->AddWindow(window_1_1, window_2_1)); | 1713 ASSERT_TRUE(wt_client2()->AddWindow(window_1_1, window_2_1)); |
| 1717 ASSERT_NO_FATAL_FAILURE(EstablishThirdConnection(wt2(), window_2_1)); | 1714 ASSERT_NO_FATAL_FAILURE(EstablishThirdConnection(wt2(), window_2_1)); |
| 1718 | 1715 |
| 1719 Id window_3_3 = wt_client3()->NewWindow(3); | 1716 Id window_3_3 = wt_client3()->NewWindow(3); |
| 1720 ASSERT_TRUE(window_3_3); | 1717 ASSERT_TRUE(window_3_3); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1737 | 1734 |
| 1738 changes2()->clear(); | 1735 changes2()->clear(); |
| 1739 | 1736 |
| 1740 // Establish a third connection in window_2_1. | 1737 // Establish a third connection in window_2_1. |
| 1741 ASSERT_NO_FATAL_FAILURE(EstablishThirdConnection(wt1(), window_2_1)); | 1738 ASSERT_NO_FATAL_FAILURE(EstablishThirdConnection(wt1(), window_2_1)); |
| 1742 | 1739 |
| 1743 ASSERT_TRUE(wt_client2()->WaitForAllMessages()); | 1740 ASSERT_TRUE(wt_client2()->WaitForAllMessages()); |
| 1744 EXPECT_EQ(std::string(), SingleChangeToDescription(*changes2())); | 1741 EXPECT_EQ(std::string(), SingleChangeToDescription(*changes2())); |
| 1745 } | 1742 } |
| 1746 | 1743 |
| 1747 TEST_F(WindowTreeClientTest, CantEmbedFromConnectionRoot) { | 1744 TEST_F(WindowTreeClientTest, DISABLED_CantEmbedFromConnectionRoot) { |
| 1748 // Shouldn't be able to embed into the root. | 1745 // Shouldn't be able to embed into the root. |
| 1749 ASSERT_FALSE(EmbedUrl(connector(), wt1(), test_name(), root_window_id())); | 1746 ASSERT_FALSE(EmbedUrl(connector(), wt1(), test_name(), root_window_id())); |
| 1750 | 1747 |
| 1751 // Even though the call above failed a WindowTreeClient was obtained. We need | 1748 // Even though the call above failed a WindowTreeClient was obtained. We need |
| 1752 // to | 1749 // to |
| 1753 // wait for it else we throw off the next connect. | 1750 // wait for it else we throw off the next connect. |
| 1754 WaitForWindowTreeClient(); | 1751 WaitForWindowTreeClient(); |
| 1755 | 1752 |
| 1756 // Don't allow a connection to embed into its own root. | 1753 // Don't allow a connection to embed into its own root. |
| 1757 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(true)); | 1754 ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(true)); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1922 | 1919 |
| 1923 // TODO(sky): make sure coverage of what was | 1920 // TODO(sky): make sure coverage of what was |
| 1924 // WindowManagerTest.SecondEmbedRoot_InitService and | 1921 // WindowManagerTest.SecondEmbedRoot_InitService and |
| 1925 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window | 1922 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window |
| 1926 // manager | 1923 // manager |
| 1927 // tests. | 1924 // tests. |
| 1928 | 1925 |
| 1929 } // namespace test | 1926 } // namespace test |
| 1930 } // namespace ws | 1927 } // namespace ws |
| 1931 } // namespace mus | 1928 } // namespace mus |
| OLD | NEW |