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

Unified Diff: content/browser/webui/web_ui_mojo_browsertest.cc

Issue 1470823002: Enable builtin Mojo JS modules in layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@usb-testing
Patch Set: oops, clumsy Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/webui/web_ui_data_source_impl.cc ('k') | content/public/browser/web_ui_data_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webui/web_ui_mojo_browsertest.cc
diff --git a/content/browser/webui/web_ui_mojo_browsertest.cc b/content/browser/webui/web_ui_mojo_browsertest.cc
index 805f1bb57751e65a66f3927a9ec7754b67395d5e..1d667eecfc96efa85a7abde0bf07c7d2dc21b46a 100644
--- a/content/browser/webui/web_ui_mojo_browsertest.cc
+++ b/content/browser/webui/web_ui_mojo_browsertest.cc
@@ -31,7 +31,6 @@
#include "content/test/data/web_ui_test_mojo_bindings.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/interface_request.h"
-#include "mojo/public/js/constants.h"
#include "mojo/test/test_utils.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
@@ -44,17 +43,6 @@ bool got_message = false;
// up the generated file from disk and returns it.
bool GetResource(const std::string& id,
const WebUIDataSource::GotDataCallback& callback) {
- // These are handled by the WebUIDataSource that AddMojoDataSource() creates.
- if (id == mojo::kBindingsModuleName ||
- id == mojo::kBufferModuleName ||
- id == mojo::kCodecModuleName ||
- id == mojo::kConnectionModuleName ||
- id == mojo::kConnectorModuleName ||
- id == mojo::kUnicodeModuleName ||
- id == mojo::kRouterModuleName ||
- id == mojo::kValidatorModuleName)
- return false;
-
if (id.find(".mojom") != std::string::npos) {
std::string contents;
CHECK(base::ReadFileToString(mojo::test::GetFilePathForJSResource(id),
@@ -110,7 +98,6 @@ class TestWebUIController : public WebUIController {
: WebUIController(web_ui), run_loop_(run_loop) {
content::WebUIDataSource* data_source =
WebUIDataSource::Create("mojo-web-ui");
- data_source->AddMojoResources();
data_source->SetRequestFilter(base::Bind(&GetResource));
content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(),
data_source);
« no previous file with comments | « content/browser/webui/web_ui_data_source_impl.cc ('k') | content/public/browser/web_ui_data_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698