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

Side by Side Diff: chrome/browser/site_per_process_interactive_browsertest.cc

Issue 2417463003: Account for failure of coordinate space transformations in browser (Closed)
Patch Set: Review comments addressed Created 4 years, 2 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
« no previous file with comments | « no previous file | content/browser/frame_host/cross_process_frame_connector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/strings/string_number_conversions.h" 6 #include "base/strings/string_number_conversions.h"
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_window.h" 8 #include "chrome/browser/ui/browser_window.h"
9 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h" 9 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } // namespace 381 } // namespace
382 382
383 // Check that an element in a cross-process subframe can enter and exit 383 // Check that an element in a cross-process subframe can enter and exit
384 // fullscreen. The test will verify that: 384 // fullscreen. The test will verify that:
385 // - the subframe is properly resized 385 // - the subframe is properly resized
386 // - the WebContents properly enters/exits fullscreen. 386 // - the WebContents properly enters/exits fullscreen.
387 // - document.webkitFullscreenElement is correctly updated in both frames. 387 // - document.webkitFullscreenElement is correctly updated in both frames.
388 // - fullscreenchange events fire in both frames. 388 // - fullscreenchange events fire in both frames.
389 // - fullscreen CSS is applied correctly in both frames. 389 // - fullscreen CSS is applied correctly in both frames.
390 // 390 //
391 // Flaky on Windows: https://crbug.com/647311
392 #if defined(OS_WIN)
393 #define MAYBE_FullscreenElementInSubframe DISABLED_FullscreenElementInSubframe
394 #else
395 #define MAYBE_FullscreenElementInSubframe FullscreenElementInSubframe
396 #endif
397 IN_PROC_BROWSER_TEST_F(SitePerProcessInteractiveBrowserTest, 391 IN_PROC_BROWSER_TEST_F(SitePerProcessInteractiveBrowserTest,
398 MAYBE_FullscreenElementInSubframe) { 392 FullscreenElementInSubframe) {
399 // Start on a page with one subframe (id "child-0") that has 393 // Start on a page with one subframe (id "child-0") that has
400 // "allowfullscreen" enabled. 394 // "allowfullscreen" enabled.
401 GURL main_url(embedded_test_server()->GetURL( 395 GURL main_url(embedded_test_server()->GetURL(
402 "a.com", "/page_with_allowfullscreen_frame.html")); 396 "a.com", "/page_with_allowfullscreen_frame.html"));
403 ui_test_utils::NavigateToURL(browser(), main_url); 397 ui_test_utils::NavigateToURL(browser(), main_url);
404 content::WebContents* web_contents = 398 content::WebContents* web_contents =
405 browser()->tab_strip_model()->GetActiveWebContents(); 399 browser()->tab_strip_model()->GetActiveWebContents();
406 400
407 // Navigate the subframe cross-site to a page with a fullscreenable <div>. 401 // Navigate the subframe cross-site to a page with a fullscreenable <div>.
408 GURL frame_url( 402 GURL frame_url(
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 EXPECT_FALSE(ElementHasFullscreenStyle(main_frame, "child-0")); 575 EXPECT_FALSE(ElementHasFullscreenStyle(main_frame, "child-0"));
582 EXPECT_FALSE(ElementHasFullscreenAncestorStyle(main_frame, "child-0")); 576 EXPECT_FALSE(ElementHasFullscreenAncestorStyle(main_frame, "child-0"));
583 577
584 // Check that document.webkitFullscreenElement was cleared in all three 578 // Check that document.webkitFullscreenElement was cleared in all three
585 // frames. 579 // frames.
586 EXPECT_EQ("none", GetFullscreenElementId(main_frame)); 580 EXPECT_EQ("none", GetFullscreenElementId(main_frame));
587 EXPECT_EQ("none", GetFullscreenElementId(child)); 581 EXPECT_EQ("none", GetFullscreenElementId(child));
588 EXPECT_EQ("none", GetFullscreenElementId(grandchild)); 582 EXPECT_EQ("none", GetFullscreenElementId(grandchild));
589 } 583 }
590 584
591 // Flaky on Windows: https://crbug.com/647311
592 #if defined(OS_WIN)
593 #define MAYBE_FullscreenElementInABAAndExitViaEscapeKey DISABLED_FullscreenEleme ntInABAAndExitViaEscapeKey
594 #else
595 #define MAYBE_FullscreenElementInABAAndExitViaEscapeKey FullscreenElementInABAAn dExitViaEscapeKey
596 #endif
597 IN_PROC_BROWSER_TEST_F(SitePerProcessInteractiveBrowserTest, 585 IN_PROC_BROWSER_TEST_F(SitePerProcessInteractiveBrowserTest,
598 MAYBE_FullscreenElementInABAAndExitViaEscapeKey) { 586 FullscreenElementInABAAndExitViaEscapeKey) {
599 FullscreenElementInABA(FullscreenExitMethod::ESC_PRESS); 587 FullscreenElementInABA(FullscreenExitMethod::ESC_PRESS);
600 } 588 }
601 589
602 IN_PROC_BROWSER_TEST_F(SitePerProcessInteractiveBrowserTest, 590 IN_PROC_BROWSER_TEST_F(SitePerProcessInteractiveBrowserTest,
603 FullscreenElementInABAAndExitViaJS) { 591 FullscreenElementInABAAndExitViaJS) {
604 FullscreenElementInABA(FullscreenExitMethod::JS_CALL); 592 FullscreenElementInABA(FullscreenExitMethod::JS_CALL);
605 } 593 }
606 594
607 // Check that fullscreen works on a more complex page hierarchy with multiple 595 // Check that fullscreen works on a more complex page hierarchy with multiple
608 // local and remote ancestors. The test uses this frame tree: 596 // local and remote ancestors. The test uses this frame tree:
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 "document.pointerLockElement)", 764 "document.pointerLockElement)",
777 &mouse_locked)); 765 &mouse_locked));
778 EXPECT_TRUE(mouse_locked); 766 EXPECT_TRUE(mouse_locked);
779 EXPECT_TRUE(main_frame->GetView()->IsMouseLocked()); 767 EXPECT_TRUE(main_frame->GetView()->IsMouseLocked());
780 768
781 EXPECT_TRUE(ExecuteScript(main_frame, 769 EXPECT_TRUE(ExecuteScript(main_frame,
782 "document.querySelector('iframe').parentNode." 770 "document.querySelector('iframe').parentNode."
783 "removeChild(document.querySelector('iframe'))")); 771 "removeChild(document.querySelector('iframe'))"));
784 EXPECT_FALSE(main_frame->GetView()->IsMouseLocked()); 772 EXPECT_FALSE(main_frame->GetView()->IsMouseLocked());
785 } 773 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/cross_process_frame_connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698