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

Unified Diff: mojo/services/view_manager/view_manager_connection_unittest.cc

Issue 290703002: Map new subtrees when they are attached to the node hierarchy visible to a connection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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
« no previous file with comments | « mojo/services/view_manager/view_manager_connection.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/view_manager/view_manager_connection_unittest.cc
diff --git a/mojo/services/view_manager/view_manager_connection_unittest.cc b/mojo/services/view_manager/view_manager_connection_unittest.cc
index 3b920a8719d14cc40ee14532a1347be4581b7a95..69422765e2019b08b83453934113cd1ceba32415 100644
--- a/mojo/services/view_manager/view_manager_connection_unittest.cc
+++ b/mojo/services/view_manager/view_manager_connection_unittest.cc
@@ -869,6 +869,8 @@ TEST_F(ViewManagerConnectionTest, SetView) {
ASSERT_TRUE(CreateNode(view_manager_.get(), 1, 1));
ASSERT_TRUE(CreateNode(view_manager_.get(), 1, 2));
ASSERT_TRUE(CreateView(view_manager_.get(), 1, 11));
+ ASSERT_TRUE(AddNode(view_manager_.get(), 1, CreateNodeId(1, 1), 1));
+ ASSERT_TRUE(AddNode(view_manager_.get(), 1, CreateNodeId(1, 2), 2));
EXPECT_TRUE(client_.GetAndClearChanges().empty());
EstablishSecondConnection();
@@ -924,17 +926,17 @@ TEST_F(ViewManagerConnectionTest, DeleteNodeWithView) {
EstablishSecondConnection();
EXPECT_TRUE(client2_.GetAndClearChanges().empty());
- // Delete node 1.
+ // Delete node 1. The second connection should not see this because the node
+ // was not known to it.
{
ASSERT_TRUE(DeleteNode(view_manager_.get(), CreateNodeId(client_.id(), 1)));
Changes changes(client_.GetAndClearChanges());
ASSERT_TRUE(changes.empty());
- client2_.DoRunLoopUntilChangesCount(2);
+ client2_.DoRunLoopUntilChangesCount(1);
changes = client2_.GetAndClearChanges();
- ASSERT_EQ(2u, changes.size());
- EXPECT_EQ("ViewReplaced node=1,1 new_view=null old_view=1,11", changes[0]);
- EXPECT_EQ("ServerChangeIdAdvanced 2", changes[1]);
+ ASSERT_EQ(1u, changes.size());
+ EXPECT_EQ("ServerChangeIdAdvanced 2", changes[0]);
}
// Parent 2 to the root.
« no previous file with comments | « mojo/services/view_manager/view_manager_connection.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698