| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_CaptureVisibleTabRace) { | 186 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_CaptureVisibleTabRace) { |
| 187 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", | 187 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", |
| 188 "test_race.html")) << message_; | 188 "test_race.html")) << message_; |
| 189 } | 189 } |
| 190 | 190 |
| 191 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleFile) { | 191 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleFile) { |
| 192 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", | 192 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", |
| 193 "test_file.html")) << message_; | 193 "test_file.html")) << message_; |
| 194 } | 194 } |
| 195 | 195 |
| 196 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleNoFile) { | 196 // Flaky on windows: http://crbug.com/238667 |
| 197 #if defined(OS_WIN) |
| 198 #define MAYBE_CaptureVisibleNoFile DISABLED_CaptureVisibleNoFile |
| 199 #else |
| 200 #define MAYBE_CaptureVisibleNoFile CaptureVisibleNoFile |
| 201 #endif |
| 202 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_CaptureVisibleNoFile) { |
| 197 ASSERT_TRUE(RunExtensionSubtest( | 203 ASSERT_TRUE(RunExtensionSubtest( |
| 198 "tabs/capture_visible_tab", "test_nofile.html", | 204 "tabs/capture_visible_tab", "test_nofile.html", |
| 199 ExtensionApiTest::kFlagNone)) << message_; | 205 ExtensionApiTest::kFlagNone)) << message_; |
| 200 } | 206 } |
| 201 | 207 |
| 202 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleDisabled) { | 208 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CaptureVisibleDisabled) { |
| 203 browser()->profile()->GetPrefs()->SetBoolean(prefs::kDisableScreenshots, | 209 browser()->profile()->GetPrefs()->SetBoolean(prefs::kDisableScreenshots, |
| 204 true); | 210 true); |
| 205 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", | 211 ASSERT_TRUE(RunExtensionSubtest("tabs/capture_visible_tab", |
| 206 "test_disabled.html")) << message_; | 212 "test_disabled.html")) << message_; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 << message_; | 269 << message_; |
| 264 } | 270 } |
| 265 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) { | 271 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_GetViewsOfCreatedWindow) { |
| 266 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) | 272 ASSERT_TRUE(RunExtensionSubtest("tabs/basics", "get_views_window.html")) |
| 267 << message_; | 273 << message_; |
| 268 } | 274 } |
| 269 | 275 |
| 270 // Adding a new test? Awesome. But API tests are the old hotness. The | 276 // Adding a new test? Awesome. But API tests are the old hotness. The |
| 271 // new hotness is extension_test_utils. See tabs_test.cc for an example. | 277 // new hotness is extension_test_utils. See tabs_test.cc for an example. |
| 272 // We are trying to phase out many uses of API tests as they tend to be flaky. | 278 // We are trying to phase out many uses of API tests as they tend to be flaky. |
| OLD | NEW |