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/web_contents.h" |
| 12 #include "content/public/test/browser_test_utils.h" |
| 13 |
| 14 class FileManagerJsTest : public InProcessBrowserTest { |
| 15 public: |
| 16 // Runs all test functions in |file|, waiting for them to complete. |
| 17 void RunTest(const base::FilePath& file) { |
| 18 GURL url = ui_test_utils::GetTestUrl( |
| 19 base::FilePath(FILE_PATH_LITERAL("file_manager/unit_tests")), file); |
| 20 ui_test_utils::NavigateToURL(browser(), url); |
| 21 |
| 22 content::RenderViewHost* rvh = browser()->tab_strip_model() |
| 23 ->GetActiveWebContents()->GetRenderViewHost(); |
| 24 ASSERT_TRUE(rvh); |
| 25 |
| 26 const std::vector<int> empty_libraries; |
| 27 EXPECT_TRUE(ExecuteWebUIResourceTest(rvh, empty_libraries)); |
| 28 } |
| 29 }; |
| 30 |
| 31 IN_PROC_BROWSER_TEST_F( |
| 32 FileManagerJsTest, NavigationListModelTest) { |
| 33 RunTest(base::FilePath( |
| 34 FILE_PATH_LITERAL("navigation_list_model_unittest.html"))); |
| 35 } |
OLD | NEW |