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

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

Issue 835253002: Update mojo sdk to rev e3719475d5971283d1d2250533d53066b2ff9797 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « 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/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 22 matching lines...) Expand all
33 namespace content { 33 namespace content {
34 namespace { 34 namespace {
35 35
36 bool got_message = false; 36 bool got_message = false;
37 37
38 // The bindings for the page are generated from a .mojom file. This code looks 38 // The bindings for the page are generated from a .mojom file. This code looks
39 // up the generated file from disk and returns it. 39 // up the generated file from disk and returns it.
40 bool GetResource(const std::string& id, 40 bool GetResource(const std::string& id,
41 const WebUIDataSource::GotDataCallback& callback) { 41 const WebUIDataSource::GotDataCallback& callback) {
42 // These are handled by the WebUIDataSource that AddMojoDataSource() creates. 42 // These are handled by the WebUIDataSource that AddMojoDataSource() creates.
43 if (id == mojo::kBufferModuleName || 43 if (id == mojo::kBindingsModuleName ||
44 id == mojo::kBufferModuleName ||
44 id == mojo::kCodecModuleName || 45 id == mojo::kCodecModuleName ||
45 id == mojo::kConnectionModuleName || 46 id == mojo::kConnectionModuleName ||
46 id == mojo::kConnectorModuleName || 47 id == mojo::kConnectorModuleName ||
47 id == mojo::kUnicodeModuleName || 48 id == mojo::kUnicodeModuleName ||
48 id == mojo::kRouterModuleName || 49 id == mojo::kRouterModuleName ||
49 id == mojo::kValidatorModuleName) 50 id == mojo::kValidatorModuleName)
50 return false; 51 return false;
51 52
52 std::string contents; 53 std::string contents;
53 CHECK(base::ReadFileToString(mojo::test::GetFilePathForJSResource(id), 54 CHECK(base::ReadFileToString(mojo::test::GetFilePathForJSResource(id),
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 NavigateToURL(other_shell, test_url); 223 NavigateToURL(other_shell, test_url);
223 // RunLoop is quit when message received from page. 224 // RunLoop is quit when message received from page.
224 other_run_loop.Run(); 225 other_run_loop.Run();
225 EXPECT_TRUE(got_message); 226 EXPECT_TRUE(got_message);
226 EXPECT_EQ(shell()->web_contents()->GetRenderProcessHost(), 227 EXPECT_EQ(shell()->web_contents()->GetRenderProcessHost(),
227 other_shell->web_contents()->GetRenderProcessHost()); 228 other_shell->web_contents()->GetRenderProcessHost());
228 } 229 }
229 230
230 } // namespace 231 } // namespace
231 } // namespace content 232 } // 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