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

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

Issue 489493004: Update view manager to support content handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: png viewer works sorta Created 6 years, 4 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
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 ad790772696d8d34653c9f0c209a8c777c6dc17d..fb0604a0a4188b0f9a97a8d505c120a6cc426419 100644
--- a/mojo/services/view_manager/view_manager_unittest.cc
+++ b/mojo/services/view_manager/view_manager_unittest.cc
@@ -1156,7 +1156,7 @@ TEST_F(ViewManagerTest, ConnectTwice) {
// Try to connect again to 1,1, this should fail as already connected to that
// root.
- ASSERT_FALSE(connection_->Embed(BuildNodeId(1, 1), kTestServiceURL));
+ ASSERT_TRUE(connection_->Embed(BuildNodeId(1, 1), kTestServiceURL));
// Connecting to 1,2 should succeed and end up in connection2.
{
@@ -1164,9 +1164,7 @@ TEST_F(ViewManagerTest, ConnectTwice) {
connection2_->DoRunLoopUntilChangesCount(1);
const Changes changes(ChangesToDescription1(connection2_->changes()));
ASSERT_EQ(1u, changes.size());
- EXPECT_EQ("OnEmbed creator=mojo:test_url", changes[0]);
- EXPECT_EQ("[node=1,2 parent=null]",
- ChangeNodeDescription(connection2_->changes()));
+ EXPECT_EQ("NodeDeleted node=1,1", changes[0]);
}
}
@@ -1233,12 +1231,13 @@ TEST_F(ViewManagerTest, EmbedWithSameNodeId2) {
changes[0]);
}
- // Embed 1,1 back in connection 2.
+ // Embed 1,1 again.
{
- // 2 should be told about the new embed.
+ // We should get a new connection for the new embedding.
ASSERT_TRUE(connection_->Embed(BuildNodeId(1, 1), kTestServiceURL));
- connection2_->DoRunLoopUntilChangesCount(1);
- const std::vector<Change>& changes(connection2_->changes());
+ ViewManagerProxy* connection4 = ViewManagerProxy::WaitForInstance();
+ connection4->DoRunLoopUntilChangesCount(1);
+ const std::vector<Change>& changes(connection4->changes());
ASSERT_EQ(1u, changes.size());
EXPECT_EQ("OnEmbed creator=mojo:test_url",
ChangesToDescription1(changes)[0]);

Powered by Google App Engine
This is Rietveld 408576698