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

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

Issue 307003004: Fixes bug where IViewManagerClient could be messaged unnecessarily (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup 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 66830a0b9c7b9312a2a92905fd33d1afda01af3b..ff0fa0989d78a47d3e30e620fcb1524c3221e845 100644
--- a/mojo/services/view_manager/view_manager_connection_unittest.cc
+++ b/mojo/services/view_manager/view_manager_connection_unittest.cc
@@ -920,12 +920,10 @@ TEST_F(ViewManagerConnectionTest, DeleteNode) {
ASSERT_TRUE(connection_->DeleteNode(BuildNodeId(1, 2)));
EXPECT_TRUE(connection_->changes().empty());
- // TODO(sky): fix this, client should not get ServerChangeIdAdvanced.
- connection2_->DoRunLoopUntilChangesCount(2);
+ connection2_->DoRunLoopUntilChangesCount(1);
const Changes changes(ChangesToDescription1(connection2_->changes()));
- ASSERT_EQ(2u, changes.size());
+ ASSERT_EQ(1u, changes.size());
EXPECT_EQ("NodeDeleted change_id=2 node=1,2", changes[0]);
- EXPECT_EQ("ServerChangeIdAdvanced 3", changes[1]);
}
}
@@ -965,12 +963,10 @@ TEST_F(ViewManagerConnectionTest, ReuseDeletedNodeId) {
{
ASSERT_TRUE(connection_->DeleteNode(BuildNodeId(1, 2)));
- // TODO(sky): fix this, shouldn't get ServerChangeIdAdvanced.
- connection2_->DoRunLoopUntilChangesCount(2);
+ connection2_->DoRunLoopUntilChangesCount(1);
const Changes changes(ChangesToDescription1(connection2_->changes()));
- ASSERT_EQ(2u, changes.size());
+ ASSERT_EQ(1u, changes.size());
EXPECT_EQ("NodeDeleted change_id=2 node=1,2", changes[0]);
- EXPECT_EQ("ServerChangeIdAdvanced 3", changes[1]);
}
// Create 2 again, and add it back to 1. Should get the same notification.
@@ -1067,12 +1063,10 @@ TEST_F(ViewManagerConnectionTest, DeleteNodeWithView) {
{
ASSERT_TRUE(connection_->DeleteNode(BuildNodeId(1, 3)));
- // TODO(sky): shouldn't get ServerChangeIdAdvanced here.
- connection2_->DoRunLoopUntilChangesCount(2);
+ connection2_->DoRunLoopUntilChangesCount(1);
const Changes changes(ChangesToDescription1(connection2_->changes()));
- ASSERT_EQ(2u, changes.size());
+ ASSERT_EQ(1u, changes.size());
EXPECT_EQ("NodeDeleted change_id=3 node=1,3", changes[0]);
- EXPECT_EQ("ServerChangeIdAdvanced 4", changes[1]);
}
}
« 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