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

Unified Diff: services/view_manager/view_manager_service_apptest.cc

Issue 996533002: Remove hardcoded tests URLs from apptests. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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_service_apptest.cc
diff --git a/services/view_manager/view_manager_service_apptest.cc b/services/view_manager/view_manager_service_apptest.cc
index 0d5eddfcf09c99a2acfca9d90384685fb5ffec7c..a9dd7de1f83575748db8e69f9c4aba9c17b40288 100644
--- a/services/view_manager/view_manager_service_apptest.cc
+++ b/services/view_manager/view_manager_service_apptest.cc
@@ -80,12 +80,12 @@ bool CreateView(ViewManagerService* vm, Id view_id) {
return result == ERROR_CODE_NONE;
}
-bool EmbedUrl(ViewManagerService* vm, Id root_id) {
+bool EmbedUrl(ViewManagerService* vm, const String& url, Id root_id) {
bool result = false;
base::RunLoop run_loop;
{
- vm->EmbedUrl("mojo:view_manager_service_apptests", root_id, nullptr,
- nullptr, base::Bind(&BoolResultCallback, &run_loop, &result));
+ vm->EmbedUrl(url, root_id, nullptr, nullptr,
+ base::Bind(&BoolResultCallback, &run_loop, &result));
}
run_loop.Run();
return result;
@@ -442,7 +442,7 @@ class ViewManagerServiceAppTest
scoped_ptr<ViewManagerClientImpl> EstablishConnectionViaEmbed(
ViewManagerService* owner,
Id root_id) {
- if (!EmbedUrl(owner, root_id)) {
+ if (!EmbedUrl(owner, mojo::test::Url(), root_id)) {
ADD_FAILURE() << "Embed() failed";
return nullptr;
}
@@ -455,8 +455,7 @@ class ViewManagerServiceAppTest
client->WaitForOnEmbed();
const std::string expected_creator =
- owner == vm1() ? "mojo:window_manager"
- : "mojo:view_manager_service_apptests";
+ owner == vm1() ? "mojo:window_manager" : mojo::test::Url();
EXPECT_EQ("OnEmbed creator=" + expected_creator,
SingleChangeToDescription(*client->tracker()->changes()));
return client.Pass();

Powered by Google App Engine
This is Rietveld 408576698