| 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 6427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6438 RenderWidgetHostView* popup_view = | 6438 RenderWidgetHostView* popup_view = |
| 6439 RenderWidgetHost::FromID(process_id, filter->last_routing_id()) | 6439 RenderWidgetHost::FromID(process_id, filter->last_routing_id()) |
| 6440 ->GetView(); | 6440 ->GetView(); |
| 6441 | 6441 |
| 6442 RenderWidgetHostMouseEventMonitor popup_monitor( | 6442 RenderWidgetHostMouseEventMonitor popup_monitor( |
| 6443 popup_view->GetRenderWidgetHost()); | 6443 popup_view->GetRenderWidgetHost()); |
| 6444 | 6444 |
| 6445 // Next send a mouse up directly targeting the first option, simulating a | 6445 // Next send a mouse up directly targeting the first option, simulating a |
| 6446 // drag. This requires a ui::MouseEvent because it tests behavior that is | 6446 // drag. This requires a ui::MouseEvent because it tests behavior that is |
| 6447 // above RWH input event routing. | 6447 // above RWH input event routing. |
| 6448 ui::MouseEvent mouse_up_event(ui::ET_MOUSE_RELEASED, gfx::Point(10, 5), | 6448 ui::MouseEvent mouse_up_event( |
| 6449 gfx::Point(10, 5), ui::EventTimeForNow(), | 6449 ui::ET_MOUSE_RELEASED, gfx::Point(10, 5), gfx::Point(10, 5), |
| 6450 ui::EF_LEFT_MOUSE_BUTTON, | 6450 ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON, |
| 6451 ui::EF_LEFT_MOUSE_BUTTON); | 6451 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE)); |
| 6452 static_cast<RenderWidgetHostViewAura*>(popup_view) | 6452 static_cast<RenderWidgetHostViewAura*>(popup_view) |
| 6453 ->OnMouseEvent(&mouse_up_event); | 6453 ->OnMouseEvent(&mouse_up_event); |
| 6454 | 6454 |
| 6455 // This verifies that the popup actually received the event, and it wasn't | 6455 // This verifies that the popup actually received the event, and it wasn't |
| 6456 // diverted to a different RenderWidgetHostView due to mouse capture. | 6456 // diverted to a different RenderWidgetHostView due to mouse capture. |
| 6457 EXPECT_TRUE(popup_monitor.EventWasReceived()); | 6457 EXPECT_TRUE(popup_monitor.EventWasReceived()); |
| 6458 #endif | 6458 #endif |
| 6459 } | 6459 } |
| 6460 | 6460 |
| 6461 // Test that clicking a select element in a nested out-of-process iframe creates | 6461 // Test that clicking a select element in a nested out-of-process iframe creates |
| (...skipping 3533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9995 names.insert(root->children[0]->frame_entry->frame_unique_name()); | 9995 names.insert(root->children[0]->frame_entry->frame_unique_name()); |
| 9996 } | 9996 } |
| 9997 | 9997 |
| 9998 // More than one entry in the set means that the subframe frame navigation | 9998 // More than one entry in the set means that the subframe frame navigation |
| 9999 // entries didn't have a consistent unique name. This will break history | 9999 // entries didn't have a consistent unique name. This will break history |
| 10000 // navigations =( | 10000 // navigations =( |
| 10001 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!"; | 10001 EXPECT_THAT(names, SizeIs(1)) << "Mismatched names for subframe!"; |
| 10002 } | 10002 } |
| 10003 | 10003 |
| 10004 } // namespace content | 10004 } // namespace content |
| OLD | NEW |