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

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: blah to the blizzah 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
« no previous file with comments | « mojo/services/view_manager/view_manager_service_impl.cc ('k') | mojo/shell/dynamic_application_loader.h » ('j') | 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 5ea3b71899fcb5709543993c51f242f3e538ee08..8c7dcb91b7127304b2201d4bb25ca3db74f63259 100644
--- a/mojo/services/view_manager/view_manager_unittest.cc
+++ b/mojo/services/view_manager/view_manager_unittest.cc
@@ -1153,7 +1153,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.
{
@@ -1161,9 +1161,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]);
}
}
@@ -1230,12 +1228,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]);
« no previous file with comments | « mojo/services/view_manager/view_manager_service_impl.cc ('k') | mojo/shell/dynamic_application_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698