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" |
11 #include "net/base/escape.h" | 11 #include "net/base/escape.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "third_party/WebKit/WebKit/chromium/public/WebData.h" | 13 #include "third_party/WebKit/WebKit/chromium/public/WebData.h" |
14 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" | 14 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
15 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" | 15 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" |
16 #include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h" | 16 #include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h" |
17 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" | 17 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" |
18 #include "webkit/tools/test_shell/test_shell.h" | 18 #include "webkit/tools/test_shell/test_shell.h" |
19 #include "webkit/tools/test_shell/test_shell_test.h" | 19 #include "webkit/tools/test_shell/test_shell_test.h" |
20 | 20 |
21 using WebKit::WebFrame; | 21 using WebKit::WebFrame; |
22 using WebKit::WebScriptSource; | 22 using WebKit::WebScriptSource; |
23 using WebKit::WebString; | 23 using WebKit::WebString; |
24 | 24 |
25 #if defined(OS_WIN) | 25 #if defined(OS_WIN) |
26 #define TEST_PLUGIN_NAME "npapi_test_plugin.dll" | 26 #define TEST_PLUGIN_NAME "npapi_test_plugin.dll" |
27 #elif defined(OS_MACOSX) | 27 #elif defined(OS_MACOSX) |
28 #define TEST_PLUGIN_NAME "npapi_test_plugin.plugin" | 28 #define TEST_PLUGIN_NAME "npapi_test_plugin.plugin" |
29 #elif defined(OS_LINUX) | 29 #elif defined(OS_POSIX) |
30 #define TEST_PLUGIN_NAME "libnpapi_test_plugin.so" | 30 #define TEST_PLUGIN_NAME "libnpapi_test_plugin.so" |
31 #endif | 31 #endif |
32 | 32 |
33 #if defined(OS_MACOSX) | 33 #if defined(OS_MACOSX) |
34 #define TEST_PLUGIN_DIRECTORY "PlugIns" | 34 #define TEST_PLUGIN_DIRECTORY "PlugIns" |
35 #else | 35 #else |
36 #define TEST_PLUGIN_DIRECTORY "plugins" | 36 #define TEST_PLUGIN_DIRECTORY "plugins" |
37 #endif | 37 #endif |
38 | 38 |
39 // Ignore these until 64-bit plugin build is fixed. http://crbug.com/18337 | 39 // Ignore these until 64-bit plugin build is fixed. http://crbug.com/18337 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 ASSERT_TRUE(IsWindowVisible(plugin_hwnd)); | 206 ASSERT_TRUE(IsWindowVisible(plugin_hwnd)); |
207 | 207 |
208 main_frame->executeScript(WebString::fromUTF8("showFrame(false)")); | 208 main_frame->executeScript(WebString::fromUTF8("showFrame(false)")); |
209 ASSERT_FALSE(IsWindowVisible(plugin_hwnd)); | 209 ASSERT_FALSE(IsWindowVisible(plugin_hwnd)); |
210 | 210 |
211 main_frame->executeScript(WebString::fromUTF8("showFrame(true)")); | 211 main_frame->executeScript(WebString::fromUTF8("showFrame(true)")); |
212 ASSERT_TRUE(IsWindowVisible(plugin_hwnd)); | 212 ASSERT_TRUE(IsWindowVisible(plugin_hwnd)); |
213 } | 213 } |
214 #endif | 214 #endif |
215 #endif //!ARCH_CPU_64_BITS | 215 #endif //!ARCH_CPU_64_BITS |
OLD | NEW |