Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Side by Side Diff: content/renderer/render_view_browsertest.cc

Issue 2227563003: Refactoring button field and its type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix new instances Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <tuple> 7 #include <tuple>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 EXPECT_EQ(1, view()->history_list_offset_); 1462 EXPECT_EQ(1, view()->history_list_offset_);
1463 } 1463 }
1464 1464
1465 TEST_F(RenderViewImplTest, ContextMenu) { 1465 TEST_F(RenderViewImplTest, ContextMenu) {
1466 LoadHTML("<div>Page A</div>"); 1466 LoadHTML("<div>Page A</div>");
1467 1467
1468 // Create a right click in the center of the iframe. (I'm hoping this will 1468 // Create a right click in the center of the iframe. (I'm hoping this will
1469 // make this a bit more robust in case of some other formatting or other bug.) 1469 // make this a bit more robust in case of some other formatting or other bug.)
1470 WebMouseEvent mouse_event; 1470 WebMouseEvent mouse_event;
1471 mouse_event.type = WebInputEvent::MouseDown; 1471 mouse_event.type = WebInputEvent::MouseDown;
1472 mouse_event.button = WebMouseEvent::ButtonRight; 1472 mouse_event.button = WebMouseEvent::Button::Right;
1473 mouse_event.x = 250; 1473 mouse_event.x = 250;
1474 mouse_event.y = 250; 1474 mouse_event.y = 250;
1475 mouse_event.globalX = 250; 1475 mouse_event.globalX = 250;
1476 mouse_event.globalY = 250; 1476 mouse_event.globalY = 250;
1477 1477
1478 SendWebMouseEvent(mouse_event); 1478 SendWebMouseEvent(mouse_event);
1479 1479
1480 // Now simulate the corresponding up event which should display the menu 1480 // Now simulate the corresponding up event which should display the menu
1481 mouse_event.type = WebInputEvent::MouseUp; 1481 mouse_event.type = WebInputEvent::MouseUp;
1482 SendWebMouseEvent(mouse_event); 1482 SendWebMouseEvent(mouse_event);
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
2483 ExpectPauseAndResume(3); 2483 ExpectPauseAndResume(3);
2484 blink::WebScriptSource source2( 2484 blink::WebScriptSource source2(
2485 WebString::fromUTF8("function func2() { func1(); }; func2();")); 2485 WebString::fromUTF8("function func2() { func1(); }; func2();"));
2486 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); 2486 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1);
2487 2487
2488 EXPECT_FALSE(IsPaused()); 2488 EXPECT_FALSE(IsPaused());
2489 Detach(); 2489 Detach();
2490 } 2490 }
2491 2491
2492 } // namespace content 2492 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/event_conversion.cc ('k') | content/renderer/render_widget_fullscreen_pepper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698