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

Side by Side Diff: mojo/runner/about_fetcher_unittest.cc

Issue 1311353005: Adds a way to determine id of content handler that created app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nuke comment Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « mojo/application/public/interfaces/shell.mojom ('k') | mojo/runner/context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "mojo/application/public/cpp/application_connection.h" 10 #include "mojo/application/public/cpp/application_connection.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // comments in that method); or 128 // comments in that method); or
129 // - the application manager fails to fetch the requested URL. 129 // - the application manager fails to fetch the requested URL.
130 service_provider.set_connection_error_handler( 130 service_provider.set_connection_error_handler(
131 [&run_loop]() { run_loop.Quit(); }); 131 [&run_loop]() { run_loop.Quit(); });
132 132
133 URLRequestPtr request(URLRequest::New()); 133 URLRequestPtr request(URLRequest::New());
134 request->url = url; 134 request->url = url;
135 application_manager_->ConnectToApplication( 135 application_manager_->ConnectToApplication(
136 nullptr, request.Pass(), std::string(), GURL(), 136 nullptr, request.Pass(), std::string(), GURL(),
137 service_provider_request.Pass(), nullptr, shell::CapabilityFilter(), 137 service_provider_request.Pass(), nullptr, shell::CapabilityFilter(),
138 base::Closure()); 138 base::Closure(), shell::EmptyConnectCallback());
139 139
140 run_loop.Run(); 140 run_loop.Run();
141 } 141 }
142 142
143 // Overridden from testing::Test: 143 // Overridden from testing::Test:
144 void SetUp() override { 144 void SetUp() override {
145 application_manager_.reset(new shell::ApplicationManager(&test_delegate_)); 145 application_manager_.reset(new shell::ApplicationManager(&test_delegate_));
146 application_manager_->SetLoaderForURL( 146 application_manager_->SetLoaderForURL(
147 make_scoped_ptr(new TestLoader(&html_content_handler_)), 147 make_scoped_ptr(new TestLoader(&html_content_handler_)),
148 GURL("test:html_content_handler")); 148 GURL("test:html_content_handler"));
(...skipping 27 matching lines...) Expand all
176 176
177 TEST_F(AboutFetcherTest, UnrecognizedURL) { 177 TEST_F(AboutFetcherTest, UnrecognizedURL) {
178 ConnectAndWait("about:some_unrecognized_url"); 178 ConnectAndWait("about:some_unrecognized_url");
179 179
180 ASSERT_EQ(0u, html_content_handler()->response_number()); 180 ASSERT_EQ(0u, html_content_handler()->response_number());
181 } 181 }
182 182
183 } // namespace 183 } // namespace
184 } // namespace runner 184 } // namespace runner
185 } // namespace mojo 185 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/application/public/interfaces/shell.mojom ('k') | mojo/runner/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698