| 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 "content/browser/site_per_process_browsertest.h" | 5 #include "content/browser/site_per_process_browsertest.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1425 nested_frame_monitor.event().x >= 4) | 1425 nested_frame_monitor.event().x >= 4) |
| 1426 << " actual event.x: " << nested_frame_monitor.event().x; | 1426 << " actual event.x: " << nested_frame_monitor.event().x; |
| 1427 EXPECT_TRUE(nested_frame_monitor.event().y <= 6 && | 1427 EXPECT_TRUE(nested_frame_monitor.event().y <= 6 && |
| 1428 nested_frame_monitor.event().y >= 4) | 1428 nested_frame_monitor.event().y >= 4) |
| 1429 << " actual event.y: " << nested_frame_monitor.event().y; | 1429 << " actual event.y: " << nested_frame_monitor.event().y; |
| 1430 EXPECT_FALSE(main_frame_monitor.EventWasReceived()); | 1430 EXPECT_FALSE(main_frame_monitor.EventWasReceived()); |
| 1431 } | 1431 } |
| 1432 | 1432 |
| 1433 // This test tests that browser process hittesting ignores frames with | 1433 // This test tests that browser process hittesting ignores frames with |
| 1434 // pointer-events: none. | 1434 // pointer-events: none. |
| 1435 #if defined(OS_ANDROID) |
| 1436 // Test failing on some Android builders, due to inaccurate coordinates on |
| 1437 // some devices. See: https://crbug.com/700007. |
| 1438 #define MAYBE_SurfaceHitTestPointerEventsNone \ |
| 1439 DISABLED_SurfaceHitTestPointerEventsNone |
| 1440 #else |
| 1441 #define MAYBE_SurfaceHitTestPointerEventsNone SurfaceHitTestPointerEventsNone |
| 1442 #endif |
| 1435 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, | 1443 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, |
| 1436 SurfaceHitTestPointerEventsNone) { | 1444 MAYBE_SurfaceHitTestPointerEventsNone) { |
| 1437 GURL main_url(embedded_test_server()->GetURL( | 1445 GURL main_url(embedded_test_server()->GetURL( |
| 1438 "/frame_tree/page_with_positioned_frame_pointer-events_none.html")); | 1446 "/frame_tree/page_with_positioned_frame_pointer-events_none.html")); |
| 1439 EXPECT_TRUE(NavigateToURL(shell(), main_url)); | 1447 EXPECT_TRUE(NavigateToURL(shell(), main_url)); |
| 1440 | 1448 |
| 1441 // It is safe to obtain the root frame tree node here, as it doesn't change. | 1449 // It is safe to obtain the root frame tree node here, as it doesn't change. |
| 1442 FrameTreeNode* root = web_contents()->GetFrameTree()->root(); | 1450 FrameTreeNode* root = web_contents()->GetFrameTree()->root(); |
| 1443 ASSERT_EQ(1U, root->child_count()); | 1451 ASSERT_EQ(1U, root->child_count()); |
| 1444 | 1452 |
| 1445 FrameTreeNode* child_node = root->child_at(0); | 1453 FrameTreeNode* child_node = root->child_at(0); |
| 1446 GURL site_url(embedded_test_server()->GetURL("baz.com", "/title1.html")); | 1454 GURL site_url(embedded_test_server()->GetURL("baz.com", "/title1.html")); |
| (...skipping 4773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6220 context_menu_delegate.Wait(); | 6228 context_menu_delegate.Wait(); |
| 6221 | 6229 |
| 6222 ContextMenuParams params = context_menu_delegate.getParams(); | 6230 ContextMenuParams params = context_menu_delegate.getParams(); |
| 6223 | 6231 |
| 6224 EXPECT_EQ(point.x(), params.x); | 6232 EXPECT_EQ(point.x(), params.x); |
| 6225 EXPECT_EQ(point.y(), params.y); | 6233 EXPECT_EQ(point.y(), params.y); |
| 6226 } | 6234 } |
| 6227 | 6235 |
| 6228 // Test that a mouse right-click to an out-of-process iframe causes a context | 6236 // Test that a mouse right-click to an out-of-process iframe causes a context |
| 6229 // menu to be generated with the correct screen position. | 6237 // menu to be generated with the correct screen position. |
| 6230 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, CreateContextMenuTest) { | 6238 #if defined(OS_ANDROID) |
| 6239 // Test failing on some Android builders, due to inaccurate coordinates on |
| 6240 // some devices. See: https://crbug.com/700007. |
| 6241 #define MAYBE_CreateContextMenuTest DISABLED_CreateContextMenuTest |
| 6242 #else |
| 6243 #define MAYBE_CreateContextMenuTest CreateContextMenuTest |
| 6244 #endif |
| 6245 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, MAYBE_CreateContextMenuTest) { |
| 6231 CreateContextMenuTestHelper(shell(), embedded_test_server()); | 6246 CreateContextMenuTestHelper(shell(), embedded_test_server()); |
| 6232 } | 6247 } |
| 6233 | 6248 |
| 6234 // Test that a mouse right-click to an out-of-process iframe causes a context | 6249 // Test that a mouse right-click to an out-of-process iframe causes a context |
| 6235 // menu to be generated with the correct screen position on a screen with | 6250 // menu to be generated with the correct screen position on a screen with |
| 6236 // non-default scale factor. | 6251 // non-default scale factor. |
| 6237 #if defined(OS_ANDROID) || defined(OS_WIN) | 6252 #if defined(OS_ANDROID) || defined(OS_WIN) |
| 6238 // High DPI tests don't work properly on Android, which has fixed scale factor. | 6253 // High DPI tests don't work properly on Android, which has fixed scale factor. |
| 6239 // Windows is disabled because of https://crbug.com/545547. | 6254 // Windows is disabled because of https://crbug.com/545547. |
| 6240 #define MAYBE_HighDPICreateContextMenuTest DISABLED_HighDPICreateContextMenuTest | 6255 #define MAYBE_HighDPICreateContextMenuTest DISABLED_HighDPICreateContextMenuTest |
| (...skipping 3554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9795 | 9810 |
| 9796 // Try the same navigation, but use the browser-initiated path. | 9811 // Try the same navigation, but use the browser-initiated path. |
| 9797 NavigateFrameToURL(root->child_at(0), frame_url); | 9812 NavigateFrameToURL(root->child_at(0), frame_url); |
| 9798 EXPECT_FALSE(root->child_at(0)->render_manager()->pending_frame_host()); | 9813 EXPECT_FALSE(root->child_at(0)->render_manager()->pending_frame_host()); |
| 9799 EXPECT_EQ(root->child_at(0)->current_url(), redirected_url); | 9814 EXPECT_EQ(root->child_at(0)->current_url(), redirected_url); |
| 9800 EXPECT_EQ(b_site_instance, | 9815 EXPECT_EQ(b_site_instance, |
| 9801 root->child_at(0)->current_frame_host()->GetSiteInstance()); | 9816 root->child_at(0)->current_frame_host()->GetSiteInstance()); |
| 9802 } | 9817 } |
| 9803 | 9818 |
| 9804 } // namespace content | 9819 } // namespace content |
| OLD | NEW |