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

Side by Side Diff: webkit/tools/test_shell/plugin_tests.cc

Issue 149620: Use WebWidget from the WebKit API. This change also makes... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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/tools/test_shell/mac/webwidget_host.mm ('k') | webkit/tools/test_shell/test_shell.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 #include <string> 5 #include <string>
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 test_html = test_html.AppendASCII("plugins"); 154 test_html = test_html.AppendASCII("plugins");
155 test_html = test_html.AppendASCII("delete_frame.html"); 155 test_html = test_html.AppendASCII("delete_frame.html");
156 test_shell_->LoadURL(test_html.ToWStringHack().c_str()); 156 test_shell_->LoadURL(test_html.ToWStringHack().c_str());
157 test_shell_->WaitTestFinished(); 157 test_shell_->WaitTestFinished();
158 158
159 WebKit::WebMouseEvent input; 159 WebKit::WebMouseEvent input;
160 input.button = WebKit::WebMouseEvent::ButtonLeft; 160 input.button = WebKit::WebMouseEvent::ButtonLeft;
161 input.x = 50; 161 input.x = 50;
162 input.y = 50; 162 input.y = 50;
163 input.type = WebKit::WebInputEvent::MouseUp; 163 input.type = WebKit::WebInputEvent::MouseUp;
164 test_shell_->webView()->HandleInputEvent(&input); 164 test_shell_->webView()->handleInputEvent(input);
165 165
166 // No crash means we passed. 166 // No crash means we passed.
167 } 167 }
168 168
169 #if defined(OS_WIN) 169 #if defined(OS_WIN)
170 BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lparam) { 170 BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lparam) {
171 HWND* plugin_hwnd = reinterpret_cast<HWND*>(lparam); 171 HWND* plugin_hwnd = reinterpret_cast<HWND*>(lparam);
172 if (*plugin_hwnd) { 172 if (*plugin_hwnd) {
173 // More than one child window found, unexpected. 173 // More than one child window found, unexpected.
174 plugin_hwnd = NULL; 174 plugin_hwnd = NULL;
(...skipping 22 matching lines...) Expand all
197 main_frame->ExecuteScript(WebString::fromUTF8("showPlugin(true)")); 197 main_frame->ExecuteScript(WebString::fromUTF8("showPlugin(true)"));
198 ASSERT_TRUE(IsWindowVisible(plugin_hwnd)); 198 ASSERT_TRUE(IsWindowVisible(plugin_hwnd));
199 199
200 main_frame->ExecuteScript(WebString::fromUTF8("showFrame(false)")); 200 main_frame->ExecuteScript(WebString::fromUTF8("showFrame(false)"));
201 ASSERT_FALSE(IsWindowVisible(plugin_hwnd)); 201 ASSERT_FALSE(IsWindowVisible(plugin_hwnd));
202 202
203 main_frame->ExecuteScript(WebString::fromUTF8("showFrame(true)")); 203 main_frame->ExecuteScript(WebString::fromUTF8("showFrame(true)"));
204 ASSERT_TRUE(IsWindowVisible(plugin_hwnd)); 204 ASSERT_TRUE(IsWindowVisible(plugin_hwnd));
205 } 205 }
206 #endif 206 #endif
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/mac/webwidget_host.mm ('k') | webkit/tools/test_shell/test_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698