OLD | NEW |
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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 EXPECT_FALSE(ElementHasFullscreenStyle(main_frame, "child-0")); | 581 EXPECT_FALSE(ElementHasFullscreenStyle(main_frame, "child-0")); |
582 EXPECT_FALSE(ElementHasFullscreenAncestorStyle(main_frame, "child-0")); | 582 EXPECT_FALSE(ElementHasFullscreenAncestorStyle(main_frame, "child-0")); |
583 | 583 |
584 // Check that document.webkitFullscreenElement was cleared in all three | 584 // Check that document.webkitFullscreenElement was cleared in all three |
585 // frames. | 585 // frames. |
586 EXPECT_EQ("none", GetFullscreenElementId(main_frame)); | 586 EXPECT_EQ("none", GetFullscreenElementId(main_frame)); |
587 EXPECT_EQ("none", GetFullscreenElementId(child)); | 587 EXPECT_EQ("none", GetFullscreenElementId(child)); |
588 EXPECT_EQ("none", GetFullscreenElementId(grandchild)); | 588 EXPECT_EQ("none", GetFullscreenElementId(grandchild)); |
589 } | 589 } |
590 | 590 |
| 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 |
591 IN_PROC_BROWSER_TEST_F(SitePerProcessInteractiveBrowserTest, | 597 IN_PROC_BROWSER_TEST_F(SitePerProcessInteractiveBrowserTest, |
592 FullscreenElementInABAAndExitViaEscapeKey) { | 598 MAYBE_FullscreenElementInABAAndExitViaEscapeKey) { |
593 FullscreenElementInABA(FullscreenExitMethod::ESC_PRESS); | 599 FullscreenElementInABA(FullscreenExitMethod::ESC_PRESS); |
594 } | 600 } |
595 | 601 |
596 IN_PROC_BROWSER_TEST_F(SitePerProcessInteractiveBrowserTest, | 602 IN_PROC_BROWSER_TEST_F(SitePerProcessInteractiveBrowserTest, |
597 FullscreenElementInABAAndExitViaJS) { | 603 FullscreenElementInABAAndExitViaJS) { |
598 FullscreenElementInABA(FullscreenExitMethod::JS_CALL); | 604 FullscreenElementInABA(FullscreenExitMethod::JS_CALL); |
599 } | 605 } |
600 | 606 |
601 // Check that fullscreen works on a more complex page hierarchy with multiple | 607 // Check that fullscreen works on a more complex page hierarchy with multiple |
602 // local and remote ancestors. The test uses this frame tree: | 608 // local and remote ancestors. The test uses this frame tree: |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 "document.pointerLockElement)", | 776 "document.pointerLockElement)", |
771 &mouse_locked)); | 777 &mouse_locked)); |
772 EXPECT_TRUE(mouse_locked); | 778 EXPECT_TRUE(mouse_locked); |
773 EXPECT_TRUE(main_frame->GetView()->IsMouseLocked()); | 779 EXPECT_TRUE(main_frame->GetView()->IsMouseLocked()); |
774 | 780 |
775 EXPECT_TRUE(ExecuteScript(main_frame, | 781 EXPECT_TRUE(ExecuteScript(main_frame, |
776 "document.querySelector('iframe').parentNode." | 782 "document.querySelector('iframe').parentNode." |
777 "removeChild(document.querySelector('iframe'))")); | 783 "removeChild(document.querySelector('iframe'))")); |
778 EXPECT_FALSE(main_frame->GetView()->IsMouseLocked()); | 784 EXPECT_FALSE(main_frame->GetView()->IsMouseLocked()); |
779 } | 785 } |
OLD | NEW |