Chromium Code Reviews| Index: chrome/test/data/webui/webui_resource_browsertest.cc |
| diff --git a/chrome/test/data/webui/webui_resource_browsertest.cc b/chrome/test/data/webui/webui_resource_browsertest.cc |
| index b3250751c4e44e2a301f08ad6aebd3a0688a2354..c4476834eef8973ce3dfec89c4b4f165c505e4d7 100644 |
| --- a/chrome/test/data/webui/webui_resource_browsertest.cc |
| +++ b/chrome/test/data/webui/webui_resource_browsertest.cc |
| @@ -4,17 +4,29 @@ |
| #include <vector> |
| +#include "base/path_service.h" |
| #include "chrome/browser/ui/browser.h" |
| #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| +#include "chrome/grit/options_test_resources.h" |
| #include "chrome/test/base/in_process_browser_test.h" |
| #include "chrome/test/base/ui_test_utils.h" |
| #include "content/public/browser/notification_registrar.h" |
| #include "content/public/browser/web_contents.h" |
| #include "content/public/test/browser_test_utils.h" |
| +#include "ui/base/resource/resource_bundle.h" |
| #include "ui/resources/grit/webui_resources.h" |
| class WebUIResourceBrowserTest : public InProcessBrowserTest { |
| public: |
| + void SetUpOnMainThread() override { |
| + // Load resources that are only used by browser_tests. |
| + base::FilePath pak_path; |
| + ASSERT_TRUE(PathService::Get(base::DIR_MODULE, &pak_path)); |
| + pak_path = pak_path.AppendASCII("browser_tests.pak"); |
| + ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
|
bondd
2014/11/07 17:36:14
I don't see any way to check whether AddDataPackFr
|
| + pak_path, ui::SCALE_FACTOR_NONE); |
| + } |
| + |
| // Runs all test functions in |file|, waiting for them to complete. |
| void RunTest(const base::FilePath& file) { |
| GURL url = ui_test_utils::GetTestUrl( |
| @@ -106,6 +118,22 @@ IN_PROC_BROWSER_TEST_F(WebUIResourceBrowserTest, ListSingleSelectionModelTest) { |
| "list_single_selection_model_test.html"))); |
| } |
| +IN_PROC_BROWSER_TEST_F(WebUIResourceBrowserTest, InlineEditableListTest) { |
| + AddLibrary(IDR_WEBUI_JS_CR); |
| + AddLibrary(IDR_WEBUI_JS_CR_EVENT_TARGET); |
| + AddLibrary(IDR_WEBUI_JS_CR_UI); |
| + AddLibrary(IDR_WEBUI_JS_CR_UI_ARRAY_DATA_MODEL); |
| + AddLibrary(IDR_WEBUI_JS_CR_UI_LIST_ITEM); |
| + AddLibrary(IDR_WEBUI_JS_CR_UI_LIST_SELECTION_CONTROLLER); |
| + AddLibrary(IDR_WEBUI_JS_CR_UI_LIST_SELECTION_MODEL); |
| + AddLibrary(IDR_WEBUI_JS_CR_UI_LIST); |
| + AddLibrary(IDR_WEBUI_JS_LOAD_TIME_DATA); |
| + AddLibrary(IDR_OPTIONS_DELETABLE_ITEM_LIST); |
| + AddLibrary(IDR_OPTIONS_INLINE_EDITABLE_LIST); |
| + RunTest(base::FilePath(FILE_PATH_LITERAL( |
| + "inline_editable_list_test.html"))); |
| +} |
| + |
| IN_PROC_BROWSER_TEST_F(WebUIResourceBrowserTest, MenuTest) { |
| AddLibrary(IDR_WEBUI_JS_ASSERT); |
| AddLibrary(IDR_WEBUI_JS_CR); |