| OLD | NEW |
| 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 "chrome/browser/ui/webui/web_component_test_ui.h" | 5 #include "chrome/browser/ui/webui/web_component_test_ui.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 10 #include "content/public/browser/web_ui.h" | 10 #include "content/public/browser/web_ui.h" |
| 11 #include "content/public/browser/web_ui_data_source.h" | 11 #include "content/public/browser/web_ui_data_source.h" |
| 12 #include "grit/browser_resources.h" | 12 #include "grit/browser_resources.h" |
| 13 | 13 |
| 14 WebComponentTestUI::WebComponentTestUI(content::WebUI* web_ui) | 14 WebComponentTestUI::WebComponentTestUI(content::WebUI* web_ui) |
| 15 : WebUIController(web_ui) { | 15 : WebUIController(web_ui) { |
| 16 content::WebUIDataSource* source = | 16 content::WebUIDataSource* source = |
| 17 content::WebUIDataSource::Create(chrome::kChromeUIWebComponentTestHost); | 17 content::WebUIDataSource::Create(chrome::kChromeUIWebComponentTestHost); |
| 18 source->AddResourcePath("mocha.js", IDR_MOCHA_JS); |
| 19 source->AddResourcePath("mocha_adapter.js", IDR_MOCHA_ADAPTER_JS); |
| 18 source->SetDefaultResource(IDR_WEB_COMPONENT_TEST_HTML); | 20 source->SetDefaultResource(IDR_WEB_COMPONENT_TEST_HTML); |
| 19 | 21 |
| 20 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source); | 22 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source); |
| 21 } | 23 } |
| OLD | NEW |