| 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 "base/string_util.h" | 5 #include "base/string_util.h" |
| 6 #include "webkit/glue/plugins/test/plugin_client.h" | 6 #include "webkit/glue/plugins/test/plugin_client.h" |
| 7 #include "webkit/glue/plugins/test/plugin_arguments_test.h" | 7 #include "webkit/glue/plugins/test/plugin_arguments_test.h" |
| 8 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
| 9 #include "webkit/glue/plugins/test/plugin_create_instance_in_paint.h" | 9 #include "webkit/glue/plugins/test/plugin_create_instance_in_paint.h" |
| 10 #endif | 10 #endif |
| 11 #include "webkit/glue/plugins/test/plugin_delete_plugin_in_stream_test.h" | 11 #include "webkit/glue/plugins/test/plugin_delete_plugin_in_stream_test.h" |
| 12 #include "webkit/glue/plugins/test/plugin_get_javascript_url_test.h" | 12 #include "webkit/glue/plugins/test/plugin_get_javascript_url_test.h" |
| 13 #include "webkit/glue/plugins/test/plugin_geturl_test.h" | 13 #include "webkit/glue/plugins/test/plugin_geturl_test.h" |
| 14 #include "webkit/glue/plugins/test/plugin_javascript_open_popup.h" | 14 #include "webkit/glue/plugins/test/plugin_javascript_open_popup.h" |
| 15 #include "webkit/glue/plugins/test/plugin_new_fails_test.h" | 15 #include "webkit/glue/plugins/test/plugin_new_fails_test.h" |
| 16 #include "webkit/glue/plugins/test/plugin_private_test.h" | 16 #include "webkit/glue/plugins/test/plugin_private_test.h" |
| 17 #include "webkit/glue/plugins/test/plugin_npobject_lifetime_test.h" | 17 #include "webkit/glue/plugins/test/plugin_npobject_lifetime_test.h" |
| 18 #include "webkit/glue/plugins/test/plugin_npobject_proxy_test.h" | 18 #include "webkit/glue/plugins/test/plugin_npobject_proxy_test.h" |
| 19 #include "webkit/glue/plugins/test/plugin_window_size_test.h" | 19 #include "webkit/glue/plugins/test/plugin_window_size_test.h" |
| 20 #include "webkit/glue/plugins/test/plugin_windowed_test.h" |
| 20 #include "webkit/glue/plugins/test/plugin_windowless_test.h" | 21 #include "webkit/glue/plugins/test/plugin_windowless_test.h" |
| 21 #include "third_party/npapi/bindings/npapi.h" | 22 #include "third_party/npapi/bindings/npapi.h" |
| 22 #include "third_party/npapi/bindings/npruntime.h" | 23 #include "third_party/npapi/bindings/npruntime.h" |
| 23 | 24 |
| 24 namespace NPAPIClient { | 25 namespace NPAPIClient { |
| 25 | 26 |
| 26 NPNetscapeFuncs* PluginClient::host_functions_; | 27 NPNetscapeFuncs* PluginClient::host_functions_; |
| 27 | 28 |
| 28 NPError PluginClient::GetEntryPoints(NPPluginFuncs* pFuncs) { | 29 NPError PluginClient::GetEntryPoints(NPPluginFuncs* pFuncs) { |
| 29 if (pFuncs == NULL) | 30 if (pFuncs == NULL) |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 #endif | 147 #endif |
| 147 } else if (test_name == "plugin_javascript_open_popup_with_plugin") { | 148 } else if (test_name == "plugin_javascript_open_popup_with_plugin") { |
| 148 new_test = new NPAPIClient::ExecuteJavascriptOpenPopupWithPluginTest( | 149 new_test = new NPAPIClient::ExecuteJavascriptOpenPopupWithPluginTest( |
| 149 instance, NPAPIClient::PluginClient::HostFunctions()); | 150 instance, NPAPIClient::PluginClient::HostFunctions()); |
| 150 } else if (test_name == "plugin_popup_with_plugin_target") { | 151 } else if (test_name == "plugin_popup_with_plugin_target") { |
| 151 new_test = new NPAPIClient::ExecuteJavascriptPopupWindowTargetPluginTest( | 152 new_test = new NPAPIClient::ExecuteJavascriptPopupWindowTargetPluginTest( |
| 152 instance, NPAPIClient::PluginClient::HostFunctions()); | 153 instance, NPAPIClient::PluginClient::HostFunctions()); |
| 153 } else if (test_name == "private") { | 154 } else if (test_name == "private") { |
| 154 new_test = new NPAPIClient::PrivateTest(instance, | 155 new_test = new NPAPIClient::PrivateTest(instance, |
| 155 NPAPIClient::PluginClient::HostFunctions()); | 156 NPAPIClient::PluginClient::HostFunctions()); |
| 157 #if defined(OS_WIN) |
| 158 // TODO(port): plugin_windowed_test.*. |
| 159 } else if (test_name == "hidden_plugin") { |
| 160 new_test = new NPAPIClient::WindowedPluginTest(instance, |
| 161 NPAPIClient::PluginClient::HostFunctions()); |
| 162 #endif |
| 156 } else { | 163 } else { |
| 157 // If we don't have a test case for this, create a | 164 // If we don't have a test case for this, create a |
| 158 // generic one which basically never fails. | 165 // generic one which basically never fails. |
| 159 LOG(WARNING) << "Unknown test name '" << test_name | 166 LOG(WARNING) << "Unknown test name '" << test_name |
| 160 << "'; using default test."; | 167 << "'; using default test."; |
| 161 new_test = new NPAPIClient::PluginTest(instance, | 168 new_test = new NPAPIClient::PluginTest(instance, |
| 162 NPAPIClient::PluginClient::HostFunctions()); | 169 NPAPIClient::PluginClient::HostFunctions()); |
| 163 } | 170 } |
| 164 | 171 |
| 165 if (new_test) { | 172 if (new_test) { |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 (NPAPIClient::PluginTest*)instance->pdata; | 301 (NPAPIClient::PluginTest*)instance->pdata; |
| 295 | 302 |
| 296 return plugin->HandleEvent(event); | 303 return plugin->HandleEvent(event); |
| 297 } | 304 } |
| 298 | 305 |
| 299 void* NPP_GetJavaClass(void) { | 306 void* NPP_GetJavaClass(void) { |
| 300 // XXXMB - do work here. | 307 // XXXMB - do work here. |
| 301 return NULL; | 308 return NULL; |
| 302 } | 309 } |
| 303 } // extern "C" | 310 } // extern "C" |
| OLD | NEW |