OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/plugins/npapi/test/plugin_test_factory.h" | 5 #include "webkit/plugins/npapi/test/plugin_test_factory.h" |
6 | 6 |
7 #include "webkit/plugins/npapi/test/plugin_arguments_test.h" | 7 #include "webkit/plugins/npapi/test/plugin_arguments_test.h" |
8 #include "webkit/plugins/npapi/test/plugin_delete_plugin_in_stream_test.h" | 8 #include "webkit/plugins/npapi/test/plugin_delete_plugin_in_stream_test.h" |
9 #include "webkit/plugins/npapi/test/plugin_get_javascript_url_test.h" | 9 #include "webkit/plugins/npapi/test/plugin_get_javascript_url_test.h" |
10 #include "webkit/plugins/npapi/test/plugin_get_javascript_url2_test.h" | 10 #include "webkit/plugins/npapi/test/plugin_get_javascript_url2_test.h" |
11 #include "webkit/plugins/npapi/test/plugin_geturl_test.h" | 11 #include "webkit/plugins/npapi/test/plugin_geturl_test.h" |
12 #include "webkit/plugins/npapi/test/plugin_javascript_open_popup.h" | 12 #include "webkit/plugins/npapi/test/plugin_javascript_open_popup.h" |
13 #include "webkit/plugins/npapi/test/plugin_new_fails_test.h" | 13 #include "webkit/plugins/npapi/test/plugin_new_fails_test.h" |
| 14 #include "webkit/plugins/npapi/test/plugin_npobject_identity_test.h" |
14 #include "webkit/plugins/npapi/test/plugin_npobject_lifetime_test.h" | 15 #include "webkit/plugins/npapi/test/plugin_npobject_lifetime_test.h" |
15 #include "webkit/plugins/npapi/test/plugin_npobject_proxy_test.h" | 16 #include "webkit/plugins/npapi/test/plugin_npobject_proxy_test.h" |
16 #include "webkit/plugins/npapi/test/plugin_private_test.h" | 17 #include "webkit/plugins/npapi/test/plugin_private_test.h" |
17 #include "webkit/plugins/npapi/test/plugin_schedule_timer_test.h" | 18 #include "webkit/plugins/npapi/test/plugin_schedule_timer_test.h" |
18 #include "webkit/plugins/npapi/test/plugin_setup_test.h" | 19 #include "webkit/plugins/npapi/test/plugin_setup_test.h" |
19 #include "webkit/plugins/npapi/test/plugin_thread_async_call_test.h" | 20 #include "webkit/plugins/npapi/test/plugin_thread_async_call_test.h" |
20 #include "webkit/plugins/npapi/test/plugin_window_size_test.h" | 21 #include "webkit/plugins/npapi/test/plugin_window_size_test.h" |
21 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
22 #include "webkit/plugins/npapi/test/plugin_windowed_test.h" | 23 #include "webkit/plugins/npapi/test/plugin_windowed_test.h" |
23 #endif | 24 #endif |
24 #include "webkit/plugins/npapi/test/plugin_windowless_test.h" | 25 #include "webkit/plugins/npapi/test/plugin_windowless_test.h" |
25 | 26 |
26 namespace NPAPIClient { | 27 namespace NPAPIClient { |
27 | 28 |
28 PluginTest* CreatePluginTest(const std::string& test_name, | 29 PluginTest* CreatePluginTest(const std::string& test_name, |
29 NPP instance, | 30 NPP instance, |
30 NPNetscapeFuncs* host_functions) { | 31 NPNetscapeFuncs* host_functions) { |
31 PluginTest* new_test = NULL; | 32 PluginTest* new_test = NULL; |
32 | 33 |
33 if (test_name == "arguments") { | 34 if (test_name == "arguments") { |
34 new_test = new PluginArgumentsTest(instance, host_functions); | 35 new_test = new PluginArgumentsTest(instance, host_functions); |
35 } else if (test_name == "geturl" || test_name == "geturl_404_response" || | 36 } else if (test_name == "geturl" || test_name == "geturl_404_response" || |
36 test_name == "geturl_fail_write" || | 37 test_name == "geturl_fail_write" || |
37 test_name == "plugin_referrer_test" || | 38 test_name == "plugin_referrer_test" || |
38 test_name == "geturlredirectnotify") { | 39 test_name == "geturlredirectnotify") { |
39 new_test = new PluginGetURLTest(instance, host_functions); | 40 new_test = new PluginGetURLTest(instance, host_functions); |
| 41 } else if (test_name == "npobject_identity") { |
| 42 new_test = new NPObjectIdentityTest(instance, host_functions); |
40 } else if (test_name == "npobject_proxy") { | 43 } else if (test_name == "npobject_proxy") { |
41 new_test = new NPObjectProxyTest(instance, host_functions); | 44 new_test = new NPObjectProxyTest(instance, host_functions); |
42 #if defined(OS_WIN) || defined(OS_MACOSX) | 45 #if defined(OS_WIN) || defined(OS_MACOSX) |
43 // TODO(port): plugin_windowless_test.*. | 46 // TODO(port): plugin_windowless_test.*. |
44 } else if (test_name == "execute_script_delete_in_paint" || | 47 } else if (test_name == "execute_script_delete_in_paint" || |
45 test_name == "execute_script_delete_in_mouse_move" || | 48 test_name == "execute_script_delete_in_mouse_move" || |
46 test_name == "delete_frame_test" || | 49 test_name == "delete_frame_test" || |
47 test_name == "multiple_instances_sync_calls" || | 50 test_name == "multiple_instances_sync_calls" || |
48 test_name == "no_hang_if_init_crashes" || | 51 test_name == "no_hang_if_init_crashes" || |
49 test_name == "convert_point") { | 52 test_name == "convert_point") { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 #endif | 98 #endif |
96 } else if (test_name == "setup") { | 99 } else if (test_name == "setup") { |
97 // "plugin" is the name for plugin documents. | 100 // "plugin" is the name for plugin documents. |
98 new_test = new PluginSetupTest(instance, host_functions); | 101 new_test = new PluginSetupTest(instance, host_functions); |
99 } | 102 } |
100 | 103 |
101 return new_test; | 104 return new_test; |
102 } | 105 } |
103 | 106 |
104 } // namespace NPAPIClient | 107 } // namespace NPAPIClient |
OLD | NEW |