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

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: Added missing CrOS guards 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
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", 159 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab",
160 "test_file.html")) << message_; 160 "test_file.html")) << message_;
161 } 161 }
162 162
163 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleNoFile) { 163 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleNoFile) {
164 ASSERT_TRUE(RunExtensionSubtest( 164 ASSERT_TRUE(RunExtensionSubtest(
165 "tabs/capture_visible_tab", "test_nofile.html", 165 "tabs/capture_visible_tab", "test_nofile.html",
166 ExtensionApiTest::kFlagNone)) << message_; 166 ExtensionApiTest::kFlagNone)) << message_;
167 } 167 }
168 168
169 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleDisabled) {
170 browser()->profile()->GetPrefs()->SetBoolean(prefs::kDisableScreenshots,
171 true);
172 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab",
173 "test_disabled.html")) << message_;
174 }
175
169 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabsOnUpdated) { 176 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, TabsOnUpdated) {
170 ASSERT_TRUE(RunExtensionTest("tabs/on_updated")) << message_; 177 ASSERT_TRUE(RunExtensionTest("tabs/on_updated")) << message_;
171 } 178 }
172 179
173 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, 180 IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
174 MAYBE_FocusWindowDoesNotExitFullscreen) { 181 MAYBE_FocusWindowDoesNotExitFullscreen) {
175 browser()->window()->EnterFullscreen( 182 browser()->window()->EnterFullscreen(
176 GURL(), FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION); 183 GURL(), FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION);
177 bool is_fullscreen = browser()->window()->IsFullscreen(); 184 bool is_fullscreen = browser()->window()->IsFullscreen();
178 ASSERT_TRUE(RunExtensionTest("window_update/focus")) << message_; 185 ASSERT_TRUE(RunExtensionTest("window_update/focus")) << message_;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 227 }
221 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) { 228 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) {
222 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) 229 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html"))
223 << message_; 230 << message_;
224 } 231 }
225 232
226 // Adding a new test? Awesome. But API tests are the old hotness. The 233 // Adding a new test? Awesome. But API tests are the old hotness. The
227 // new hotness is extension_test_utils. See extension_tabs_test.cc for 234 // new hotness is extension_test_utils. See extension_tabs_test.cc for
228 // an example. We are trying to phase out many uses of API tests as 235 // an example. We are trying to phase out many uses of API tests as
229 // they tend to be flaky. 236 // they tend to be flaky.
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/policy_browsertest.cc » ('j') | chrome/browser/policy/policy_browsertest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698