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

Side by Side Diff: webkit/glue/context_menu_unittest.cc

Issue 164225: Switch to WebFrame from the WebKit API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/chrome_client_impl.cc ('k') | webkit/glue/cpp_bound_class.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // Tests for displaying context menus in corner cases (and swallowing context 5 // Tests for displaying context menus in corner cases (and swallowing context
6 // menu events when appropriate) 6 // menu events when appropriate)
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "webkit/glue/webframe.h"
14 #include "webkit/glue/webkit_glue.h" 13 #include "webkit/glue/webkit_glue.h"
15 #include "webkit/glue/webview.h" 14 #include "webkit/glue/webview.h"
16 #include "webkit/tools/test_shell/test_shell_test.h" 15 #include "webkit/tools/test_shell/test_shell_test.h"
17 16
18 using WebKit::WebInputEvent; 17 using WebKit::WebInputEvent;
19 using WebKit::WebMouseEvent; 18 using WebKit::WebMouseEvent;
20 19
21 // Right clicking inside on an iframe should produce a context menu 20 // Right clicking inside on an iframe should produce a context menu
22 class ContextMenuCapturing : public TestShellTest { 21 class ContextMenuCapturing : public TestShellTest {
23 protected: 22 protected:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 56
58 WebView* webview = test_shell_->webView(); 57 WebView* webview = test_shell_->webView();
59 webview->handleInputEvent(mouse_event); 58 webview->handleInputEvent(mouse_event);
60 59
61 // Now simulate the corresponding up event which should display the menu 60 // Now simulate the corresponding up event which should display the menu
62 mouse_event.type = WebInputEvent::MouseUp; 61 mouse_event.type = WebInputEvent::MouseUp;
63 webview->handleInputEvent(mouse_event); 62 webview->handleInputEvent(mouse_event);
64 63
65 EXPECT_EQ(1U, test_delegate->captured_context_menu_events().size()); 64 EXPECT_EQ(1U, test_delegate->captured_context_menu_events().size());
66 } 65 }
OLDNEW
« no previous file with comments | « webkit/glue/chrome_client_impl.cc ('k') | webkit/glue/cpp_bound_class.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698