| OLD | NEW |
| 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 "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 8 #include "chrome/browser/prefs/incognito_mode_prefs.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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 } | 192 } |
| 193 | 193 |
| 194 // Times out on non-Windows. | 194 // Times out on non-Windows. |
| 195 // See http://crbug.com/80212 | 195 // See http://crbug.com/80212 |
| 196 IN_PROC_BROWSER_TEST_F(ExtensionApiCaptureTest, | 196 IN_PROC_BROWSER_TEST_F(ExtensionApiCaptureTest, |
| 197 DISABLED_CaptureVisibleTabRace) { | 197 DISABLED_CaptureVisibleTabRace) { |
| 198 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", | 198 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", |
| 199 "test_race.html")) << message_; | 199 "test_race.html")) << message_; |
| 200 } | 200 } |
| 201 | 201 |
| 202 IN_PROC_BROWSER_TEST_F(ExtensionApiCaptureTest, CaptureVisibleFile) { | 202 |
| 203 // Disabled for being flaky, see http://crbug/367695. |
| 204 IN_PROC_BROWSER_TEST_F(ExtensionApiCaptureTest, |
| 205 DISABLED_CaptureVisibleFile) { |
| 203 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", | 206 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", |
| 204 "test_file.html")) << message_; | 207 "test_file.html")) << message_; |
| 205 } | 208 } |
| 206 | 209 |
| 207 IN_PROC_BROWSER_TEST_F(ExtensionApiCaptureTest, CaptureVisibleDisabled) { | 210 IN_PROC_BROWSER_TEST_F(ExtensionApiCaptureTest, CaptureVisibleDisabled) { |
| 208 browser()->profile()->GetPrefs()->SetBoolean(prefs::kDisableScreenshots, | 211 browser()->profile()->GetPrefs()->SetBoolean(prefs::kDisableScreenshots, |
| 209 true); | 212 true); |
| 210 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", | 213 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", |
| 211 "test_disabled.html")) << message_; | 214 "test_disabled.html")) << message_; |
| 212 } | 215 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 << message_; | 255 << message_; |
| 253 } | 256 } |
| 254 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) { | 257 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) { |
| 255 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) | 258 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) |
| 256 << message_; | 259 << message_; |
| 257 } | 260 } |
| 258 | 261 |
| 259 // Adding a new test? Awesome. But API tests are the old hotness. The | 262 // Adding a new test? Awesome. But API tests are the old hotness. The |
| 260 // new hotness is extension_test_utils. See tabs_test.cc for an example. | 263 // new hotness is extension_test_utils. See tabs_test.cc for an example. |
| 261 // We are trying to phase out many uses of API tests as they tend to be flaky. | 264 // We are trying to phase out many uses of API tests as they tend to be flaky. |
| OLD | NEW |