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

Side by Side Diff: chrome/browser/extensions/extension_tabs_apitest.cc

Issue 10784009: screenshot disabling policy tests (Closed) Base URL: http://git.chromium.org/chromium/src.git@disable_screenshots
Patch Set: Rebased Created 8 years, 3 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/browser/policy/policy_browsertest.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/extensions/extension_apitest.h" 5 #include "chrome/browser/extensions/extension_apitest.h"
6 6
7 #include "chrome/browser/prefs/incognito_mode_prefs.h" 7 #include "chrome/browser/prefs/incognito_mode_prefs.h"
8 #include "chrome/browser/prefs/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", 165 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab",
166 "test_file.html")) << message_; 166 "test_file.html")) << message_;
167 } 167 }
168 168
169 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleNoFile) { 169 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleNoFile) {
170 ASSERT_TRUE(RunExtensionSubtest( 170 ASSERT_TRUE(RunExtensionSubtest(
171 "tabs/capture_visible_tab", "test_nofile.html", 171 "tabs/capture_visible_tab", "test_nofile.html",
172 ExtensionApiTest::kFlagNone)) << message_; 172 ExtensionApiTest::kFlagNone)) << message_;
173 } 173 }
174 174
175 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleDisabled) {
176 browser()->profile()->GetPrefs()->SetBoolean(prefs::kDisableScreenshots,
177 true);
178 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab",
179 "test_disabled.html")) << message_;
180 }
181
175 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabsOnUpdated) { 182 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabsOnUpdated) {
176 ASSERT_TRUE(RunExtensionTest("tabs/on_updated")) << message_; 183 ASSERT_TRUE(RunExtensionTest("tabs/on_updated")) << message_;
177 } 184 }
178 185
179 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, 186 IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
180 MAYBE_FocusWindowDoesNotExitFullscreen) { 187 MAYBE_FocusWindowDoesNotExitFullscreen) {
181 browser()->window()->EnterFullscreen( 188 browser()->window()->EnterFullscreen(
182 GURL(), FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION); 189 GURL(), FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION);
183 bool is_fullscreen = browser()->window()->IsFullscreen(); 190 bool is_fullscreen = browser()->window()->IsFullscreen();
184 ASSERT_TRUE(RunExtensionTest("window_update/focus")) << message_; 191 ASSERT_TRUE(RunExtensionTest("window_update/focus")) << message_;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 233 }
227 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) { 234 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) {
228 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) 235 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html"))
229 << message_; 236 << message_;
230 } 237 }
231 238
232 // Adding a new test? Awesome. But API tests are the old hotness. The 239 // Adding a new test? Awesome. But API tests are the old hotness. The
233 // new hotness is extension_test_utils. See extension_tabs_test.cc for 240 // new hotness is extension_test_utils. See extension_tabs_test.cc for
234 // an example. We are trying to phase out many uses of API tests as 241 // an example. We are trying to phase out many uses of API tests as
235 // they tend to be flaky. 242 // they tend to be flaky.
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698