OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/file_path.h" | 5 #include "base/file_path.h" |
| 6 #include "chrome/browser/ui/webui/web_ui_browsertest.h" |
6 #include "chrome/common/url_constants.h" | 7 #include "chrome/common/url_constants.h" |
7 #include "chrome/test/base/ui_test_utils.h" | 8 #include "chrome/test/base/ui_test_utils.h" |
8 #include "chrome/test/base/web_ui_browsertest.h" | |
9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
10 | 10 |
11 class MostVisitedWebUITest : public WebUIBrowserTest { | 11 class MostVisitedWebUITest : public WebUIBrowserTest { |
12 public: | 12 public: |
13 virtual ~MostVisitedWebUITest() {} | 13 virtual ~MostVisitedWebUITest() {} |
14 | 14 |
15 virtual void SetUpInProcessBrowserTestFixture() { | 15 virtual void SetUpInProcessBrowserTestFixture() { |
16 WebUIBrowserTest::SetUpInProcessBrowserTestFixture(); | 16 WebUIBrowserTest::SetUpInProcessBrowserTestFixture(); |
17 AddLibrary(FilePath(FILE_PATH_LITERAL("most_visited_page_test.js"))); | 17 AddLibrary(FilePath(FILE_PATH_LITERAL("most_visited_page_test.js"))); |
18 } | 18 } |
19 | 19 |
20 virtual void SetUpOnMainThread() { | 20 virtual void SetUpOnMainThread() { |
21 WebUIBrowserTest::SetUpOnMainThread(); | |
22 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUINewTabURL)); | 21 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUINewTabURL)); |
23 } | 22 } |
24 }; | 23 }; |
25 | 24 |
26 WEB_UI_UNITTEST_F(MostVisitedWebUITest, refreshDataBasic); | 25 WEB_UI_UNITTEST_F(MostVisitedWebUITest, refreshDataBasic); |
27 WEB_UI_UNITTEST_F(MostVisitedWebUITest, refreshDataOrdering); | 26 WEB_UI_UNITTEST_F(MostVisitedWebUITest, refreshDataOrdering); |
28 WEB_UI_UNITTEST_F(MostVisitedWebUITest, refreshDataPinning); | 27 WEB_UI_UNITTEST_F(MostVisitedWebUITest, refreshDataPinning); |
OLD | NEW |