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

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

Issue 403083002: Allow EmbedRoot to be called multiple times. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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_init_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 73153737e56b037d7e0447f7a4f0039bbab139c5..259079648a04cd2fecdf9a1febf9995da4a6539d 100644
--- a/mojo/services/view_manager/view_manager_unittest.cc
+++ b/mojo/services/view_manager/view_manager_unittest.cc
@@ -318,7 +318,7 @@ class TestViewManagerClientConnection
connection_.set_view_manager(client());
}
- // ViewMangerClient:
+ // ViewManagerClient:
virtual void OnViewManagerConnectionEstablished(
ConnectionSpecificId connection_id,
const String& creator_url,
@@ -363,6 +363,9 @@ class TestViewManagerClientConnection
}
virtual void OnFocusChanged(Id gained_focus_id,
Id lost_focus_id) OVERRIDE {}
+ virtual void EmbedRoot(const String& url) OVERRIDE {
+ tracker_.OnEmbedRoot(url);
+ }
virtual void DispatchOnViewInputEvent(Id view_id,
mojo::EventPtr event) OVERRIDE {
}
@@ -517,6 +520,12 @@ class ViewManagerTest : public testing::Test {
DISALLOW_COPY_AND_ASSIGN(ViewManagerTest);
};
+TEST_F(ViewManagerTest, SecondEmbedRoot) {
+ ASSERT_TRUE(EmbedRoot(view_manager_init_.get(), kTestServiceURL));
+ connection_->DoRunLoopUntilChangesCount(1);
+ EXPECT_EQ(kTestServiceURL, connection_->changes()[0].embed_url);
+}
+
// Verifies client gets a valid id.
TEST_F(ViewManagerTest, ValidId) {
// TODO(beng): this should really have the URL of the application that
« no previous file with comments | « mojo/services/view_manager/view_manager_init_service_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698