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

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

Issue 331243002: Makes IViewManager::DeleteNode take the server_change_id (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: resolve merge Created 6 years, 6 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_service_impl.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_unittest.cc
diff --git a/mojo/services/view_manager/view_manager_unittest.cc b/mojo/services/view_manager/view_manager_unittest.cc
index 7fe52340329a3765d84e115f0b200e365c0af29f..aeaebeea02d8767d3e59f1cede829cc1919452e7 100644
--- a/mojo/services/view_manager/view_manager_unittest.cc
+++ b/mojo/services/view_manager/view_manager_unittest.cc
@@ -162,10 +162,11 @@ class ViewManagerProxy : public TestChangeTracker::Delegate {
RunMainLoop();
return result;
}
- bool DeleteNode(Id node_id) {
+ bool DeleteNode(Id node_id, Id server_change_id) {
changes_.clear();
bool result = false;
view_manager_->DeleteNode(node_id,
+ server_change_id,
base::Bind(&ViewManagerProxy::GotResult,
base::Unretained(this), &result));
RunMainLoop();
@@ -878,7 +879,7 @@ TEST_F(ViewManagerTest, DeleteNode) {
// Delete 2.
{
- ASSERT_TRUE(connection_->DeleteNode(BuildNodeId(1, 2)));
+ ASSERT_TRUE(connection_->DeleteNode(BuildNodeId(1, 2), 2));
EXPECT_TRUE(connection_->changes().empty());
connection2_->DoRunLoopUntilChangesCount(1);
@@ -891,7 +892,7 @@ TEST_F(ViewManagerTest, DeleteNode) {
// Verifies DeleteNode isn't allowed from a separate connection.
TEST_F(ViewManagerTest, DeleteNodeFromAnotherConnectionDisallowed) {
ASSERT_NO_FATAL_FAILURE(EstablishSecondConnection(true));
- EXPECT_FALSE(connection2_->DeleteNode(BuildNodeId(1, 1)));
+ EXPECT_FALSE(connection2_->DeleteNode(BuildNodeId(1, 1), 1));
}
// Verifies DeleteView isn't allowed from a separate connection.
@@ -922,7 +923,7 @@ TEST_F(ViewManagerTest, ReuseDeletedNodeId) {
// Delete 2.
{
- ASSERT_TRUE(connection_->DeleteNode(BuildNodeId(1, 2)));
+ ASSERT_TRUE(connection_->DeleteNode(BuildNodeId(1, 2), 2));
connection2_->DoRunLoopUntilChangesCount(1);
const Changes changes(ChangesToDescription1(connection2_->changes()));
@@ -998,7 +999,7 @@ TEST_F(ViewManagerTest, DeleteNodeWithView) {
// Delete node 2. The second connection should not see this because the node
// was not known to it.
{
- ASSERT_TRUE(connection_->DeleteNode(BuildNodeId(1, 2)));
+ ASSERT_TRUE(connection_->DeleteNode(BuildNodeId(1, 2), 1));
connection2_->DoRunLoopUntilChangesCount(1);
const Changes changes(ChangesToDescription1(connection2_->changes()));
@@ -1022,7 +1023,7 @@ TEST_F(ViewManagerTest, DeleteNodeWithView) {
// Delete 3.
{
- ASSERT_TRUE(connection_->DeleteNode(BuildNodeId(1, 3)));
+ ASSERT_TRUE(connection_->DeleteNode(BuildNodeId(1, 3), 3));
connection2_->DoRunLoopUntilChangesCount(1);
const Changes changes(ChangesToDescription1(connection2_->changes()));
@@ -1189,7 +1190,7 @@ TEST_F(ViewManagerTest, SetRoots) {
// Delete 4, client shouldn't receive a delete since it should no longer know
// about 4.
{
- ASSERT_TRUE(connection_->DeleteNode(BuildNodeId(1, 4)));
+ ASSERT_TRUE(connection_->DeleteNode(BuildNodeId(1, 4), 5));
connection2_->DoRunLoopUntilChangesCount(1);
const Changes changes(ChangesToDescription1(connection2_->changes()));
« no previous file with comments | « mojo/services/view_manager/view_manager_service_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698