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

Side by Side Diff: chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc

Issue 2604133002: Fix TabCaptureApiTest.FullscreenEvents flakiness (Closed)
Patch Set: Created 3 years, 11 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 "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
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
315 // Tests that fullscreen transitions during a tab capture session dispatch 314 // Tests that fullscreen transitions during a tab capture session dispatch
316 // events to the onStatusChange listener. The test loads a page that toggles 315 // events to the onStatusChange listener. The test loads a page that toggles
317 // fullscreen mode, using the Fullscreen Javascript API, in response to mouse 316 // fullscreen mode, using the Fullscreen Javascript API, in response to mouse
318 // clicks. 317 // clicks.
319 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, DISABLED_FullscreenEvents) { 318 IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, FullscreenEvents) {
320 AddExtensionToCommandLineWhitelist(); 319 AddExtensionToCommandLineWhitelist();
321 320
322 ExtensionTestMessageListener capture_started("tab_capture_started", false); 321 ExtensionTestMessageListener capture_started("tab_capture_started", false);
323 ExtensionTestMessageListener entered_fullscreen("entered_fullscreen", false); 322 ExtensionTestMessageListener entered_fullscreen("entered_fullscreen", false);
324 323
325 ASSERT_TRUE(RunExtensionSubtest("tab_capture", "fullscreen_test.html")) 324 ASSERT_TRUE(RunExtensionSubtest("tab_capture", "fullscreen_test.html"))
326 << message_; 325 << message_;
327 EXPECT_TRUE(capture_started.WaitUntilSatisfied()); 326 EXPECT_TRUE(capture_started.WaitUntilSatisfied());
328 327
329 // Click on the page to trigger the Javascript that will toggle the tab into 328 // 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
464 EXPECT_EQ(TabAlertState::TAB_CAPTURING, observer.last_alert_state()); 463 EXPECT_EQ(TabAlertState::TAB_CAPTURING, observer.last_alert_state());
465 return; 464 return;
466 } 465 }
467 content::RunMessageLoop(); 466 content::RunMessageLoop();
468 } 467 }
469 } 468 }
470 469
471 } // namespace 470 } // namespace
472 471
473 } // namespace extensions 472 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698