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

Unified Diff: services/view_manager/view_manager_client_apptest.cc

Issue 996533002: Remove hardcoded tests URLs from apptests. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Edit Created 5 years, 9 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: services/view_manager/view_manager_client_apptest.cc
diff --git a/services/view_manager/view_manager_client_apptest.cc b/services/view_manager/view_manager_client_apptest.cc
index 82e255063c2f026cf30b19eebb0ac156a8310351..fe2964f6b1eee1499009b8dd5f2747d9b7bd804f 100644
--- a/services/view_manager/view_manager_client_apptest.cc
+++ b/services/view_manager/view_manager_client_apptest.cc
@@ -27,9 +27,6 @@ namespace mojo {
namespace {
-const char kViewManagerClientTestAppURL[] =
- "mojo:mojo_view_manager_client_apptests";
-
base::RunLoop* current_run_loop = nullptr;
void TimeoutRunLoop(const base::Closure& timeout_task, bool* timeout) {
@@ -206,7 +203,7 @@ class ViewManagerTest : public test::ApplicationTestBase,
ViewManager* Embed(ViewManager* view_manager, View* view) {
DCHECK_EQ(view_manager, view->view_manager());
most_recent_view_manager_ = nullptr;
- view->Embed(kViewManagerClientTestAppURL);
+ view->Embed(application_impl()->url());
if (!DoRunLoopWithTimeout())
return nullptr;
ViewManager* vm = nullptr;
@@ -231,7 +228,7 @@ class ViewManagerTest : public test::ApplicationTestBase,
ApplicationTestBase::SetUp();
view_manager_context_.reset(new ViewManagerContext(application_impl()));
- view_manager_context_->Embed(kViewManagerClientTestAppURL);
+ view_manager_context_->Embed(application_impl()->url());
ASSERT_TRUE(DoRunLoopWithTimeout());
std::swap(window_manager_, most_recent_view_manager_);
}
@@ -387,7 +384,7 @@ TEST_F(ViewManagerTest, EmbeddingIdentity) {
window_manager()->GetRoot()->AddChild(view);
ViewManager* embedded = Embed(window_manager(), view);
ASSERT_NE(nullptr, embedded);
- EXPECT_EQ(kViewManagerClientTestAppURL, embedded->GetEmbedderURL());
+ EXPECT_EQ(application_impl()->url(), embedded->GetEmbedderURL());
}
// TODO(alhaad): Currently, the RunLoop gets stuck waiting for order change.
« no previous file with comments | « mojo/public/cpp/application/lib/application_test_base.cc ('k') | services/view_manager/view_manager_service_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698