Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Side by Side Diff: chrome/browser/chromeos/extensions/wallpaper_manager_browsertest.cc

Issue 618743003: Unit test for sync online wallpaper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/test/data/chromeos/wallpaper_manager/unit_tests/api_mock.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/path_service.h" 6 #include "base/path_service.h"
7 #include "chrome/browser/apps/app_browsertest_util.h" 7 #include "chrome/browser/apps/app_browsertest_util.h"
8 #include "chrome/browser/extensions/component_loader.h" 8 #include "chrome/browser/extensions/component_loader.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
11 #include "chrome/test/base/ui_test_utils.h"
12 #include "content/public/test/browser_test_utils.h"
10 #include "extensions/browser/extension_registry.h" 13 #include "extensions/browser/extension_registry.h"
11 #include "extensions/test/extension_test_message_listener.h" 14 #include "extensions/test/extension_test_message_listener.h"
12 #include "grit/browser_resources.h" 15 #include "grit/browser_resources.h"
13 16
14 using extensions::Extension; 17 using extensions::Extension;
15 using extensions::ExtensionRegistry; 18 using extensions::ExtensionRegistry;
16 19
17 namespace { 20 namespace {
18 const char* kWallpaperManagerExtensionID = "obklkkbkpaoaejdabbfldmcfplpdgolj"; 21 const char* kWallpaperManagerExtensionID = "obklkkbkpaoaejdabbfldmcfplpdgolj";
19 } // namespace 22 } // namespace
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, DevLaunchApp) { 64 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, DevLaunchApp) {
62 VerifyWallpaperManagerLoaded(); 65 VerifyWallpaperManagerLoaded();
63 } 66 }
64 67
65 // Test for crbug.com/410550. Wallpaper picker should be able to create 68 // Test for crbug.com/410550. Wallpaper picker should be able to create
66 // alpha enabled window successfully. 69 // alpha enabled window successfully.
67 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, StableLaunchApp) { 70 IN_PROC_BROWSER_TEST_F(WallpaperManagerBrowserTest, StableLaunchApp) {
68 extensions::ScopedCurrentChannel channel(chrome::VersionInfo::CHANNEL_STABLE); 71 extensions::ScopedCurrentChannel channel(chrome::VersionInfo::CHANNEL_STABLE);
69 VerifyWallpaperManagerLoaded(); 72 VerifyWallpaperManagerLoaded();
70 } 73 }
74
75 class WallpaperManagerJsTest : public InProcessBrowserTest {
76 public:
77 void RunTest(const base::FilePath& file) {
78 GURL url = ui_test_utils::GetTestUrl(
79 base::FilePath(
80 FILE_PATH_LITERAL("chromeos/wallpaper_manager/unit_tests")),
81 file);
82 ui_test_utils::NavigateToURL(browser(), url);
83
84 content::WebContents* web_contents =
85 browser()->tab_strip_model()->GetActiveWebContents();
86 ASSERT_TRUE(web_contents);
87
88 const std::vector<int> empty_libraries;
89 EXPECT_TRUE(ExecuteWebUIResourceTest(web_contents, empty_libraries));
90 }
91 };
92
93 IN_PROC_BROWSER_TEST_F(WallpaperManagerJsTest, EventPageTest) {
94 RunTest(base::FilePath(FILE_PATH_LITERAL("event_page_unittest.html")));
95 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/chromeos/wallpaper_manager/unit_tests/api_mock.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698