| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |