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

Side by Side Diff: content/browser/webui/web_ui_mojo_browsertest.cc

Issue 693343003: Update to using //mojo/public/js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « content/browser/webui/web_ui_data_source_impl.cc ('k') | content/content_resources.grd » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <limits> 5 #include <limits>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 11 matching lines...) Expand all
22 #include "content/public/common/content_switches.h" 22 #include "content/public/common/content_switches.h"
23 #include "content/public/common/service_registry.h" 23 #include "content/public/common/service_registry.h"
24 #include "content/public/common/url_utils.h" 24 #include "content/public/common/url_utils.h"
25 #include "content/public/test/content_browser_test.h" 25 #include "content/public/test/content_browser_test.h"
26 #include "content/public/test/content_browser_test_utils.h" 26 #include "content/public/test/content_browser_test_utils.h"
27 #include "content/shell/browser/shell.h" 27 #include "content/shell/browser/shell.h"
28 #include "content/test/data/web_ui_test_mojo_bindings.mojom.h" 28 #include "content/test/data/web_ui_test_mojo_bindings.mojom.h"
29 #include "mojo/edk/test/test_utils.h" 29 #include "mojo/edk/test/test_utils.h"
30 #include "mojo/public/cpp/bindings/interface_impl.h" 30 #include "mojo/public/cpp/bindings/interface_impl.h"
31 #include "mojo/public/cpp/bindings/interface_request.h" 31 #include "mojo/public/cpp/bindings/interface_request.h"
32 #include "mojo/public/js/bindings/constants.h" 32 #include "mojo/public/js/constants.h"
33 33
34 namespace content { 34 namespace content {
35 namespace { 35 namespace {
36 36
37 bool got_message = false; 37 bool got_message = false;
38 38
39 // The bindings for the page are generated from a .mojom file. This code looks 39 // The bindings for the page are generated from a .mojom file. This code looks
40 // up the generated file from disk and returns it. 40 // up the generated file from disk and returns it.
41 bool GetResource(const std::string& id, 41 bool GetResource(const std::string& id,
42 const WebUIDataSource::GotDataCallback& callback) { 42 const WebUIDataSource::GotDataCallback& callback) {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 NavigateToURL(other_shell, test_url); 225 NavigateToURL(other_shell, test_url);
226 // RunLoop is quit when message received from page. 226 // RunLoop is quit when message received from page.
227 other_run_loop.Run(); 227 other_run_loop.Run();
228 EXPECT_TRUE(got_message); 228 EXPECT_TRUE(got_message);
229 EXPECT_EQ(shell()->web_contents()->GetRenderProcessHost(), 229 EXPECT_EQ(shell()->web_contents()->GetRenderProcessHost(),
230 other_shell->web_contents()->GetRenderProcessHost()); 230 other_shell->web_contents()->GetRenderProcessHost());
231 } 231 }
232 232
233 } // namespace 233 } // namespace
234 } // namespace content 234 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/webui/web_ui_data_source_impl.cc ('k') | content/content_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698