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/renderer_context_menu/render_view_context_menu_browsert
est_util.h" | 7 #include "chrome/browser/renderer_context_menu/render_view_context_menu_browsert
est_util.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
10 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h" | 10 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // Add content/test/data for cross_site_iframe_factory.html | 46 // Add content/test/data for cross_site_iframe_factory.html |
47 embedded_test_server()->ServeFilesFromSourceDirectory("content/test/data"); | 47 embedded_test_server()->ServeFilesFromSourceDirectory("content/test/data"); |
48 | 48 |
49 ASSERT_TRUE(embedded_test_server()->Start()); | 49 ASSERT_TRUE(embedded_test_server()->Start()); |
50 } | 50 } |
51 | 51 |
52 gfx::Size GetScreenSize() { | 52 gfx::Size GetScreenSize() { |
53 content::WebContents* web_contents = | 53 content::WebContents* web_contents = |
54 browser()->tab_strip_model()->GetActiveWebContents(); | 54 browser()->tab_strip_model()->GetActiveWebContents(); |
55 const display::Display display = | 55 const display::Display display = |
56 display::Screen::GetScreen()->GetDisplayNearestWindow( | 56 display::Screen::GetScreen()->GetDisplayNearestView( |
57 web_contents->GetRenderWidgetHostView()->GetNativeView()); | 57 web_contents->GetRenderWidgetHostView()->GetNativeView()); |
58 return display.bounds().size(); | 58 return display.bounds().size(); |
59 } | 59 } |
60 | 60 |
61 enum class FullscreenExitMethod { | 61 enum class FullscreenExitMethod { |
62 JS_CALL, | 62 JS_CALL, |
63 ESC_PRESS, | 63 ESC_PRESS, |
64 }; | 64 }; |
65 | 65 |
66 void FullscreenElementInABA(FullscreenExitMethod exit_method); | 66 void FullscreenElementInABA(FullscreenExitMethod exit_method); |
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 send_right_mouse_event(child_view->GetRenderWidgetHost(), 10, 20, | 917 send_right_mouse_event(child_view->GetRenderWidgetHost(), 10, 20, |
918 blink::WebInputEvent::MouseUp); | 918 blink::WebInputEvent::MouseUp); |
919 menu_waiter.WaitForMenuOpenAndClose(); | 919 menu_waiter.WaitForMenuOpenAndClose(); |
920 | 920 |
921 gfx::Point point_in_root_window = | 921 gfx::Point point_in_root_window = |
922 child_view->TransformPointToRootCoordSpace(gfx::Point(10, 20)); | 922 child_view->TransformPointToRootCoordSpace(gfx::Point(10, 20)); |
923 | 923 |
924 EXPECT_EQ(point_in_root_window.x(), menu_waiter.params().x); | 924 EXPECT_EQ(point_in_root_window.x(), menu_waiter.params().x); |
925 EXPECT_EQ(point_in_root_window.y(), menu_waiter.params().y); | 925 EXPECT_EQ(point_in_root_window.y(), menu_waiter.params().y); |
926 } | 926 } |
OLD | NEW |