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

Unified Diff: mojo/public/cpp/application/lib/application_test_base.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: mojo/public/cpp/application/lib/application_test_base.cc
diff --git a/mojo/public/cpp/application/lib/application_test_base.cc b/mojo/public/cpp/application/lib/application_test_base.cc
index 406c826d4de16d0001cc78c976c55e66ba31aa18..5cf6939a7669adcfc6db22092e48ce5978a39d81 100644
--- a/mojo/public/cpp/application/lib/application_test_base.cc
+++ b/mojo/public/cpp/application/lib/application_test_base.cc
@@ -17,6 +17,8 @@ namespace {
// Share the application command-line arguments with multiple application tests.
Array<String> g_args;
+String g_url;
viettrungluu 2015/03/10 15:31:52 No comment? (Also, the seemingly-random order of
Nick Bray (chromium) 2015/03/10 19:39:00 Done.
+
// Application request handle passed from the shell in MojoMain, stored in
// between SetUp()/TearDown() so we can (re-)intialize new ApplicationImpls.
InterfaceRequest<Application> g_application_request;
@@ -51,6 +53,7 @@ class ShellAndArgumentGrabber : public Application {
Array<String> args,
const mojo::String& url) override {
*args_ = args.Pass();
+ g_url = url;
g_application_request = binding_.Unbind();
g_shell = shell.Pass();
}
@@ -74,6 +77,10 @@ const Array<String>& Args() {
return g_args;
}
+const String& Url() {
+ return g_url;
+}
+
MojoResult RunAllTests(MojoHandle application_request_handle) {
{
// This loop is used for init, and then destroyed before running tests.
@@ -140,7 +147,7 @@ void ApplicationTestBase::SetUp() {
g_application_request.Pass());
// Fake application initialization with the given command line arguments.
- application_impl_->Initialize(g_shell.Pass(), g_args.Clone(), "");
+ application_impl_->Initialize(g_shell.Pass(), g_args.Clone(), g_url);
viettrungluu 2015/03/10 15:31:52 I agree that this is probably right, and that pass
}
void ApplicationTestBase::TearDown() {

Powered by Google App Engine
This is Rietveld 408576698