Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include <vector> | |
| 6 | |
| 7 #include "chrome/browser/ui/browser.h" | |
| 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" | |
| 9 #include "chrome/test/base/in_process_browser_test.h" | |
| 10 #include "chrome/test/base/ui_test_utils.h" | |
| 11 #include "content/public/browser/render_view_host.h" | |
|
hashimoto
2013/11/01 08:15:47
nit: Perhaps, no need to include this?
yoshiki
2013/11/04 18:17:20
Done.
| |
| 12 #include "content/public/browser/web_contents.h" | |
| 13 #include "content/public/test/browser_test_utils.h" | |
| 14 #include "grit/webui_resources.h" | |
|
hashimoto
2013/11/01 08:15:47
nit: No need to include this?
yoshiki
2013/11/04 18:17:20
Done.
| |
| 15 | |
| 16 class FileManagerUnitTestsBrowserTest : public InProcessBrowserTest { | |
| 17 public: | |
| 18 // Runs all test functions in |file|, waiting for them to complete. | |
| 19 void RunTest(const base::FilePath& file) { | |
| 20 GURL url = ui_test_utils::GetTestUrl( | |
| 21 base::FilePath(FILE_PATH_LITERAL("file_manager/unit_tests")), file); | |
| 22 ui_test_utils::NavigateToURL(browser(), url); | |
| 23 | |
| 24 content::RenderViewHost* rvh = browser()->tab_strip_model() | |
| 25 ->GetActiveWebContents()->GetRenderViewHost(); | |
| 26 ASSERT_TRUE(rvh); | |
| 27 | |
| 28 const std::vector<int> empty_libraries; | |
| 29 EXPECT_TRUE(ExecuteWebUIResourceTest(rvh, empty_libraries)); | |
| 30 } | |
| 31 }; | |
| 32 | |
| 33 IN_PROC_BROWSER_TEST_F( | |
| 34 FileManagerUnitTestsBrowserTest, NavigationListModelTest) { | |
| 35 RunTest(base::FilePath( | |
| 36 FILE_PATH_LITERAL("navigation_list_model_unittest.html"))); | |
| 37 } | |
| OLD | NEW |