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

Unified Diff: mojo/shell/application_manager_unittest.cc

Issue 1121783003: Move navigations with POST or referrer to the shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 7 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/shell/application_manager.cc ('k') | mojo/shell/fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/application_manager_unittest.cc
diff --git a/mojo/shell/application_manager_unittest.cc b/mojo/shell/application_manager_unittest.cc
index 2d6fd5c72bc576564d4f4108492620dda9eaac96..e0a8b6d1b934799cdae9f6d4eb51fd4ba6565085 100644
--- a/mojo/shell/application_manager_unittest.cc
+++ b/mojo/shell/application_manager_unittest.cc
@@ -40,6 +40,7 @@ class TestMimeTypeFetcher : public Fetcher {
// Fetcher:
const GURL& GetURL() const override { return url_; }
GURL GetRedirectURL() const override { return GURL("yyy"); }
+ GURL GetRedirectReferer() const override { return GURL(); }
URLResponsePtr AsURLResponse(base::TaskRunner* task_runner,
uint32_t skip) override {
return URLResponse::New().Pass();
@@ -285,7 +286,9 @@ class TestAImpl : public TestA {
TesterContext* test_context,
InterfaceRequest<TestA> request)
: test_context_(test_context), binding_(this, request.Pass()) {
- app_impl->ConnectToApplication(kTestBURLString)->ConnectToService(&b_);
+ mojo::URLRequestPtr request2(mojo::URLRequest::New());
+ request2->url = mojo::String::From(kTestBURLString);
+ app_impl->ConnectToApplication(request2.Pass())->ConnectToService(&b_);
}
~TestAImpl() override {
@@ -767,8 +770,10 @@ TEST_F(ApplicationManagerTest, TestEndApplicationClosure) {
scoped_ptr<ApplicationLoader>(loader), "test");
bool called = false;
+ mojo::URLRequestPtr request(mojo::URLRequest::New());
+ request->url = mojo::String::From("test:test");
application_manager_->ConnectToApplication(
- GURL("test:test"), GURL(), nullptr, nullptr,
+ request.Pass(), GURL(), nullptr, nullptr,
base::Bind(&QuitClosure, base::Unretained(&called)));
loop_.Run();
EXPECT_TRUE(called);
@@ -792,8 +797,10 @@ TEST(ApplicationManagerTest2, ContentHandlerConnectionGetsRequestorURL) {
content_handler_url);
bool called = false;
+ mojo::URLRequestPtr request(mojo::URLRequest::New());
+ request->url = mojo::String::From("test:test");
application_manager.ConnectToApplication(
- GURL("test:test"), requestor_url, nullptr, nullptr,
+ request.Pass(), requestor_url, nullptr, nullptr,
base::Bind(&QuitClosure, base::Unretained(&called)));
loop.Run();
EXPECT_TRUE(called);
« no previous file with comments | « mojo/shell/application_manager.cc ('k') | mojo/shell/fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698