| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 kExtensionId); | 263 kExtensionId); |
| 264 TabHelper::FromWebContents(web_contents) | 264 TabHelper::FromWebContents(web_contents) |
| 265 ->active_tab_permission_granter()->GrantIfRequested(extension); | 265 ->active_tab_permission_granter()->GrantIfRequested(extension); |
| 266 before_open_tab.Reply(""); | 266 before_open_tab.Reply(""); |
| 267 | 267 |
| 268 ResultCatcher catcher; | 268 ResultCatcher catcher; |
| 269 catcher.RestrictToBrowserContext(browser()->profile()); | 269 catcher.RestrictToBrowserContext(browser()->profile()); |
| 270 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 270 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 271 } | 271 } |
| 272 | 272 |
| 273 // Flaky on Windows: http://crbug.com/177163 | |
| 274 // Flaky on Linux ASan: http://crbug.com/468256 | |
| 275 #if (defined(OS_WIN) && !defined(NDEBUG)) || \ | |
| 276 (defined(OS_LINUX) && defined(ADDRESS_SANITIZER)) | |
| 277 #define MAYBE_CaptureInSplitIncognitoMode DISABLED_CaptureInSplitIncognitoMode | |
| 278 #else | |
| 279 #define MAYBE_CaptureInSplitIncognitoMode CaptureInSplitIncognitoMode | |
| 280 #endif | |
| 281 // Tests that a tab in incognito mode can be captured. | 273 // Tests that a tab in incognito mode can be captured. |
| 282 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_CaptureInSplitIncognitoMode) { | 274 // Disabled due to flakiness. http://crbug.com/468608. |
| 275 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, |
| 276 DISABLED_CaptureInSplitIncognitoMode) { |
| 283 AddExtensionToCommandLineWhitelist(); | 277 AddExtensionToCommandLineWhitelist(); |
| 284 ASSERT_TRUE(RunExtensionSubtest("tab_capture", | 278 ASSERT_TRUE(RunExtensionSubtest("tab_capture", |
| 285 "start_tab_capture.html", | 279 "start_tab_capture.html", |
| 286 kFlagEnableIncognito | kFlagUseIncognito)) | 280 kFlagEnableIncognito | kFlagUseIncognito)) |
| 287 << message_; | 281 << message_; |
| 288 } | 282 } |
| 289 | 283 |
| 290 // http://crbug.com/177163 | 284 // http://crbug.com/177163 |
| 291 #if defined(OS_WIN) && !defined(NDEBUG) | 285 #if defined(OS_WIN) && !defined(NDEBUG) |
| 292 #define MAYBE_Constraints DISABLED_Constraints | 286 #define MAYBE_Constraints DISABLED_Constraints |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 return; | 347 return; |
| 354 } | 348 } |
| 355 content::RunMessageLoop(); | 349 content::RunMessageLoop(); |
| 356 } | 350 } |
| 357 browser()->tab_strip_model()->RemoveObserver(&observer); | 351 browser()->tab_strip_model()->RemoveObserver(&observer); |
| 358 } | 352 } |
| 359 | 353 |
| 360 } // namespace | 354 } // namespace |
| 361 | 355 |
| 362 } // namespace extensions | 356 } // namespace extensions |
| OLD | NEW |