| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/files/file_path.h" | 5 #include "base/files/file_path.h" |
| 6 #include "chrome/browser/apps/app_browsertest_util.h" | 6 #include "chrome/browser/apps/app_browsertest_util.h" |
| 7 #include "chrome/browser/extensions/component_loader.h" | 7 #include "chrome/browser/extensions/component_loader.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 9 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 10 #include "chrome/test/base/ui_test_utils.h" | 10 #include "chrome/test/base/ui_test_utils.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 } | 60 } |
| 61 | 61 |
| 62 // Test for crbug.com/410550. | 62 // Test for crbug.com/410550. |
| 63 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, DevLaunchApp) { | 63 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, DevLaunchApp) { |
| 64 VerifyWallpaperManagerLoaded(); | 64 VerifyWallpaperManagerLoaded(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 // Test for crbug.com/410550. Wallpaper picker should be able to create | 67 // Test for crbug.com/410550. Wallpaper picker should be able to create |
| 68 // alpha enabled window successfully. | 68 // alpha enabled window successfully. |
| 69 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, StableLaunchApp) { | 69 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, StableLaunchApp) { |
| 70 extensions::ScopedCurrentChannel channel(chrome::VersionInfo::CHANNEL_STABLE); | 70 extensions::ScopedCurrentChannel channel(version_info::Channel::STABLE); |
| 71 VerifyWallpaperManagerLoaded(); | 71 VerifyWallpaperManagerLoaded(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 class WallpaperManagerJsTest : public InProcessBrowserTest { | 74 class WallpaperManagerJsTest : public InProcessBrowserTest { |
| 75 public: | 75 public: |
| 76 void RunTest(const base::FilePath& file) { | 76 void RunTest(const base::FilePath& file) { |
| 77 GURL url = ui_test_utils::GetTestUrl( | 77 GURL url = ui_test_utils::GetTestUrl( |
| 78 base::FilePath( | 78 base::FilePath( |
| 79 FILE_PATH_LITERAL("chromeos/wallpaper_manager/unit_tests")), | 79 FILE_PATH_LITERAL("chromeos/wallpaper_manager/unit_tests")), |
| 80 file); | 80 file); |
| 81 ui_test_utils::NavigateToURL(browser(), url); | 81 ui_test_utils::NavigateToURL(browser(), url); |
| 82 | 82 |
| 83 content::WebContents* web_contents = | 83 content::WebContents* web_contents = |
| 84 browser()->tab_strip_model()->GetActiveWebContents(); | 84 browser()->tab_strip_model()->GetActiveWebContents(); |
| 85 ASSERT_TRUE(web_contents); | 85 ASSERT_TRUE(web_contents); |
| 86 | 86 |
| 87 const std::vector<int> empty_libraries; | 87 const std::vector<int> empty_libraries; |
| 88 EXPECT_TRUE(ExecuteWebUIResourceTest(web_contents, empty_libraries)); | 88 EXPECT_TRUE(ExecuteWebUIResourceTest(web_contents, empty_libraries)); |
| 89 } | 89 } |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 IN_PROC_BROWSER_TEST_F(WallpaperManagerJsTest, EventPageTest) { | 92 IN_PROC_BROWSER_TEST_F(WallpaperManagerJsTest, EventPageTest) { |
| 93 RunTest(base::FilePath(FILE_PATH_LITERAL("event_page_unittest.html"))); | 93 RunTest(base::FilePath(FILE_PATH_LITERAL("event_page_unittest.html"))); |
| 94 } | 94 } |
| OLD | NEW |