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 8128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8139 // Verify child-RWHI gets TS/TE, GTD/GSB/GSE. | 8139 // Verify child-RWHI gets TS/TE, GTD/GSB/GSE. |
8140 EXPECT_TRUE(child_frame_monitor.EventWasReceived()); | 8140 EXPECT_TRUE(child_frame_monitor.EventWasReceived()); |
8141 EXPECT_EQ(blink::WebInputEvent::TouchStart, | 8141 EXPECT_EQ(blink::WebInputEvent::TouchStart, |
8142 child_frame_monitor.events_received()[0]); | 8142 child_frame_monitor.events_received()[0]); |
8143 EXPECT_EQ(blink::WebInputEvent::TouchEnd, | 8143 EXPECT_EQ(blink::WebInputEvent::TouchEnd, |
8144 child_frame_monitor.events_received()[1]); | 8144 child_frame_monitor.events_received()[1]); |
8145 EXPECT_EQ(blink::WebInputEvent::GestureTapDown, | 8145 EXPECT_EQ(blink::WebInputEvent::GestureTapDown, |
8146 child_frame_monitor.events_received()[2]); | 8146 child_frame_monitor.events_received()[2]); |
8147 EXPECT_EQ(blink::WebInputEvent::GestureScrollBegin, | 8147 EXPECT_EQ(blink::WebInputEvent::GestureScrollBegin, |
8148 child_frame_monitor.events_received()[3]); | 8148 child_frame_monitor.events_received()[3]); |
| 8149 EXPECT_EQ(blink::WebInputEvent::GesturePinchBegin, |
| 8150 child_frame_monitor.events_received()[4]); |
| 8151 EXPECT_EQ(blink::WebInputEvent::GesturePinchEnd, |
| 8152 child_frame_monitor.events_received()[5]); |
8149 EXPECT_EQ(blink::WebInputEvent::GestureScrollEnd, | 8153 EXPECT_EQ(blink::WebInputEvent::GestureScrollEnd, |
8150 child_frame_monitor.events_received()[4]); | 8154 child_frame_monitor.events_received()[6]); |
8151 } | 8155 } |
8152 | 8156 |
8153 IN_PROC_BROWSER_TEST_F(SitePerProcessGestureBrowserTest, | 8157 IN_PROC_BROWSER_TEST_F(SitePerProcessGestureBrowserTest, |
8154 MainframeGesturePinchGoesToMainFrame) { | 8158 MainframeGesturePinchGoesToMainFrame) { |
8155 SetupRootAndChild(); | 8159 SetupRootAndChild(); |
8156 | 8160 |
8157 TestInputEventObserver root_frame_monitor(rwhi_root_); | 8161 TestInputEventObserver root_frame_monitor(rwhi_root_); |
8158 TestInputEventObserver child_frame_monitor(rwhi_child_); | 8162 TestInputEventObserver child_frame_monitor(rwhi_child_); |
8159 | 8163 |
8160 // Need child rect in main frame coords. | 8164 // Need child rect in main frame coords. |
(...skipping 15 matching lines...) Expand all Loading... |
8176 EXPECT_EQ(blink::WebInputEvent::GestureScrollBegin, | 8180 EXPECT_EQ(blink::WebInputEvent::GestureScrollBegin, |
8177 root_frame_monitor.events_received()[3]); | 8181 root_frame_monitor.events_received()[3]); |
8178 EXPECT_EQ(blink::WebInputEvent::GesturePinchBegin, | 8182 EXPECT_EQ(blink::WebInputEvent::GesturePinchBegin, |
8179 root_frame_monitor.events_received()[4]); | 8183 root_frame_monitor.events_received()[4]); |
8180 EXPECT_EQ(blink::WebInputEvent::GesturePinchEnd, | 8184 EXPECT_EQ(blink::WebInputEvent::GesturePinchEnd, |
8181 root_frame_monitor.events_received()[5]); | 8185 root_frame_monitor.events_received()[5]); |
8182 EXPECT_EQ(blink::WebInputEvent::GestureScrollEnd, | 8186 EXPECT_EQ(blink::WebInputEvent::GestureScrollEnd, |
8183 root_frame_monitor.events_received()[6]); | 8187 root_frame_monitor.events_received()[6]); |
8184 | 8188 |
8185 // Verify child-RWHI gets no events. | 8189 // Verify child-RWHI gets no events. |
8186 EXPECT_FALSE(child_frame_monitor.EventWasReceived()); | 8190 EXPECT_TRUE(child_frame_monitor.EventWasReceived()); |
| 8191 EXPECT_EQ(blink::WebInputEvent::GesturePinchBegin, |
| 8192 child_frame_monitor.events_received()[0]); |
| 8193 EXPECT_EQ(blink::WebInputEvent::GesturePinchEnd, |
| 8194 child_frame_monitor.events_received()[1]); |
8187 } | 8195 } |
8188 #endif | 8196 #endif |
8189 | 8197 |
8190 // Test that the pending RenderFrameHost is canceled and destroyed when its | 8198 // Test that the pending RenderFrameHost is canceled and destroyed when its |
8191 // process dies. Previously, reusing a top-level pending RFH which | 8199 // process dies. Previously, reusing a top-level pending RFH which |
8192 // is not live was hitting a CHECK in CreateRenderView due to having neither a | 8200 // is not live was hitting a CHECK in CreateRenderView due to having neither a |
8193 // main frame routing ID nor a proxy routing ID. See https://crbug.com/627400 | 8201 // main frame routing ID nor a proxy routing ID. See https://crbug.com/627400 |
8194 // for more details. | 8202 // for more details. |
8195 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, | 8203 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, |
8196 PendingRFHIsCanceledWhenItsProcessDies) { | 8204 PendingRFHIsCanceledWhenItsProcessDies) { |
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9171 shell(), embedded_test_server()->GetURL("b.com", "/title3.html"))); | 9179 shell(), embedded_test_server()->GetURL("b.com", "/title3.html"))); |
9172 | 9180 |
9173 // Pretend that a.com just requested a context menu. This used to cause a | 9181 // Pretend that a.com just requested a context menu. This used to cause a |
9174 // because the RenderWidgetHostView is destroyed when the frame is swapped and | 9182 // because the RenderWidgetHostView is destroyed when the frame is swapped and |
9175 // added to pending delete list. | 9183 // added to pending delete list. |
9176 rfh->OnMessageReceived( | 9184 rfh->OnMessageReceived( |
9177 FrameHostMsg_ContextMenu(rfh->GetRoutingID(), ContextMenuParams())); | 9185 FrameHostMsg_ContextMenu(rfh->GetRoutingID(), ContextMenuParams())); |
9178 } | 9186 } |
9179 | 9187 |
9180 } // namespace content | 9188 } // namespace content |
OLD | NEW |