| 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/location.h" | 6 #include "base/location.h" |
| 7 #include "base/single_thread_task_runner.h" | 7 #include "base/single_thread_task_runner.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "base/test/test_timeouts.h" | 9 #include "base/test/test_timeouts.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 // Add extension to whitelist and make sure capture succeeds. | 304 // Add extension to whitelist and make sure capture succeeds. |
| 305 EXPECT_TRUE(before_whitelist_extension.WaitUntilSatisfied()); | 305 EXPECT_TRUE(before_whitelist_extension.WaitUntilSatisfied()); |
| 306 AddExtensionToCommandLineWhitelist(); | 306 AddExtensionToCommandLineWhitelist(); |
| 307 before_whitelist_extension.Reply(""); | 307 before_whitelist_extension.Reply(""); |
| 308 | 308 |
| 309 ResultCatcher catcher; | 309 ResultCatcher catcher; |
| 310 catcher.RestrictToBrowserContext(browser()->profile()); | 310 catcher.RestrictToBrowserContext(browser()->profile()); |
| 311 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 311 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 312 } | 312 } |
| 313 | 313 |
| 314 // Flaky: http://crbug.com/675851 |
| 314 // Tests that fullscreen transitions during a tab capture session dispatch | 315 // Tests that fullscreen transitions during a tab capture session dispatch |
| 315 // events to the onStatusChange listener. The test loads a page that toggles | 316 // events to the onStatusChange listener. The test loads a page that toggles |
| 316 // fullscreen mode, using the Fullscreen Javascript API, in response to mouse | 317 // fullscreen mode, using the Fullscreen Javascript API, in response to mouse |
| 317 // clicks. | 318 // clicks. |
| 318 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, FullscreenEvents) { | 319 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, DISABLED_FullscreenEvents) { |
| 319 AddExtensionToCommandLineWhitelist(); | 320 AddExtensionToCommandLineWhitelist(); |
| 320 | 321 |
| 321 ExtensionTestMessageListener capture_started("tab_capture_started", false); | 322 ExtensionTestMessageListener capture_started("tab_capture_started", false); |
| 322 ExtensionTestMessageListener entered_fullscreen("entered_fullscreen", false); | 323 ExtensionTestMessageListener entered_fullscreen("entered_fullscreen", false); |
| 323 | 324 |
| 324 ASSERT_TRUE(RunExtensionSubtest("tab_capture", "fullscreen_test.html")) | 325 ASSERT_TRUE(RunExtensionSubtest("tab_capture", "fullscreen_test.html")) |
| 325 << message_; | 326 << message_; |
| 326 EXPECT_TRUE(capture_started.WaitUntilSatisfied()); | 327 EXPECT_TRUE(capture_started.WaitUntilSatisfied()); |
| 327 | 328 |
| 328 // Click on the page to trigger the Javascript that will toggle the tab into | 329 // Click on the page to trigger the Javascript that will toggle the tab into |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 EXPECT_EQ(TabAlertState::TAB_CAPTURING, observer.last_alert_state()); | 464 EXPECT_EQ(TabAlertState::TAB_CAPTURING, observer.last_alert_state()); |
| 464 return; | 465 return; |
| 465 } | 466 } |
| 466 content::RunMessageLoop(); | 467 content::RunMessageLoop(); |
| 467 } | 468 } |
| 468 } | 469 } |
| 469 | 470 |
| 470 } // namespace | 471 } // namespace |
| 471 | 472 |
| 472 } // namespace extensions | 473 } // namespace extensions |
| OLD | NEW |