diff options
Diffstat (limited to 'webkit/tools')
-rw-r--r-- | webkit/tools/npapi_layout_test_plugin/PluginObject.cpp | 10 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell.gyp | 322 |
2 files changed, 170 insertions, 162 deletions
diff --git a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp index f06e099..2e671e6 100644 --- a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp +++ b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp @@ -501,14 +501,14 @@ static bool testGetIntIdentifier(PluginObject*, const NPVariant* args, uint32_t if (NPVARIANT_IS_DOUBLE(args[0])) { identifier = browser->getintidentifier((int)NPVARIANT_TO_DOUBLE(args[0])); + INT32_TO_NPVARIANT((int32)identifier, *result); + return true; } else if (NPVARIANT_IS_INT32(args[0])) { identifier = browser->getintidentifier((int)NPVARIANT_TO_INT32(args[0])); - } else { - return false; + INT32_TO_NPVARIANT((int32)identifier, *result); + return true; } - - INT32_TO_NPVARIANT(static_cast<int32>(reinterpret_cast<intptr_t>(identifier)), *result); - return true; + return false; } static bool testGetProperty(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result) diff --git a/webkit/tools/test_shell/test_shell.gyp b/webkit/tools/test_shell/test_shell.gyp index ec758cf..3ce7b22 100644 --- a/webkit/tools/test_shell/test_shell.gyp +++ b/webkit/tools/test_shell/test_shell.gyp @@ -119,6 +119,13 @@ '../../api/WebKit.gyp:webkit', ], 'conditions': [ + # http://code.google.com/p/chromium/issues/detail?id=18337 + ['target_arch!="x64"', { + 'dependencies': [ + 'npapi_layout_test_plugin', + 'npapi_test_plugin', + ], + }], ['OS=="linux"', { 'dependencies': [ 'test_shell_resources', @@ -133,7 +140,7 @@ ['exclude', '_x11\\.cc$'], ], }], - ['OS=="linux"', { + ['OS=="linux" and target_arch!="x64"', { # See below TODO in the Windows branch. 'copies': [ { @@ -461,172 +468,173 @@ }], ], }, - { - 'target_name': 'npapi_layout_test_plugin', - 'type': 'loadable_module', - 'mac_bundle': 1, - 'msvs_guid': 'BE6D5659-A8D5-4890-A42C-090DD10EF62C', - 'sources': [ - '../npapi_layout_test_plugin/PluginObject.cpp', - '../npapi_layout_test_plugin/TestObject.cpp', - '../npapi_layout_test_plugin/main.cpp', - '../npapi_layout_test_plugin/npapi_layout_test_plugin.def', - '../npapi_layout_test_plugin/npapi_layout_test_plugin.rc', - ], - 'include_dirs': [ - '../../..', - ], - 'dependencies': [ - '../../../third_party/npapi/npapi.gyp:npapi', - '../../../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf', - ], - 'msvs_disabled_warnings': [ 4996 ], - 'mac_bundle_resources': [ - '../npapi_layout_test_plugin/Info.r', - ], - 'xcode_settings': { - 'INFOPLIST_FILE': '../npapi_layout_test_plugin/Info.plist', - }, - 'conditions': [ - ['OS!="win"', { - 'sources!': [ + ], + 'conditions': [ + # http://code.google.com/p/chromium/issues/detail?id=18337 + ['target_arch!="x64"', { + 'targets': [ + { + 'target_name': 'npapi_layout_test_plugin', + 'type': 'loadable_module', + 'mac_bundle': 1, + 'msvs_guid': 'BE6D5659-A8D5-4890-A42C-090DD10EF62C', + 'sources': [ + '../npapi_layout_test_plugin/PluginObject.cpp', + '../npapi_layout_test_plugin/TestObject.cpp', + '../npapi_layout_test_plugin/main.cpp', '../npapi_layout_test_plugin/npapi_layout_test_plugin.def', '../npapi_layout_test_plugin/npapi_layout_test_plugin.rc', ], - # TODO(bradnelson): - # This copy should really live here, as a post-build step, - # but it's currently being implemented via - # AdditionalDependencies, which tries to do the copy before - # the file is built... - # - }, { # OS == "win" - # # The old VS build would explicitly copy the .dll into the - # # plugins subdirectory like this. It might be possible to - # # use the 'product_dir' setting to build directly into - # # plugins/ (as is done on Linux), but we'd need to verify - # # that nothing breaks first. - # 'copies': [ - # { - # 'destination': '<(PRODUCT_DIR)/plugins', - # 'files': ['<(PRODUCT_DIR)/npapi_layout_test_plugin.dll'], - # }, - # ], - 'link_settings': { - 'libraries': [ - "winmm.lib", - ], - }, - }], - ['OS=="mac"', { - 'product_name': 'TestNetscapePlugIn', - 'product_extension': 'plugin', - 'link_settings': { - 'libraries': [ - '$(SDKROOT)/System/Library/Frameworks/Carbon.framework', - ], + 'include_dirs': [ + '../../..', + ], + 'dependencies': [ + '../../../third_party/npapi/npapi.gyp:npapi', + '../../../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf', + ], + 'msvs_disabled_warnings': [ 4996 ], + 'mac_bundle_resources': [ + '../npapi_layout_test_plugin/Info.r', + ], + 'xcode_settings': { + 'INFOPLIST_FILE': '../npapi_layout_test_plugin/Info.plist', }, - }], - ['OS=="linux" and target_arch=="x64"', { - # Shared libraries need -fPIC on x86-64 - 'cflags': ['-fPIC'] - }], - ], - }, - { - 'target_name': 'npapi_test_plugin', - 'type': 'loadable_module', - 'mac_bundle': 1, - 'msvs_guid': '0D04AEC1-6B68-492C-BCCF-808DFD69ABC6', - 'dependencies': [ - '../../../base/base.gyp:base', - '../../../third_party/icu/icu.gyp:icuuc', - '../../../third_party/npapi/npapi.gyp:npapi', - ], - 'sources': [ - '../../glue/plugins/test/npapi_constants.cc', - '../../glue/plugins/test/npapi_constants.h', - '../../glue/plugins/test/npapi_test.cc', - '../../glue/plugins/test/npapi_test.def', - '../../glue/plugins/test/npapi_test.rc', - '../../glue/plugins/test/plugin_arguments_test.cc', - '../../glue/plugins/test/plugin_arguments_test.h', - '../../glue/plugins/test/plugin_client.cc', - '../../glue/plugins/test/plugin_client.h', - '../../glue/plugins/test/plugin_create_instance_in_paint.cc', - '../../glue/plugins/test/plugin_create_instance_in_paint.h', - '../../glue/plugins/test/plugin_delete_plugin_in_stream_test.cc', - '../../glue/plugins/test/plugin_delete_plugin_in_stream_test.h', - '../../glue/plugins/test/plugin_get_javascript_url_test.cc', - '../../glue/plugins/test/plugin_get_javascript_url_test.h', - '../../glue/plugins/test/plugin_get_javascript_url2_test.cc', - '../../glue/plugins/test/plugin_get_javascript_url2_test.h', - '../../glue/plugins/test/plugin_geturl_test.cc', - '../../glue/plugins/test/plugin_geturl_test.h', - '../../glue/plugins/test/plugin_javascript_open_popup.cc', - '../../glue/plugins/test/plugin_javascript_open_popup.h', - '../../glue/plugins/test/plugin_new_fails_test.cc', - '../../glue/plugins/test/plugin_new_fails_test.h', - '../../glue/plugins/test/plugin_npobject_lifetime_test.cc', - '../../glue/plugins/test/plugin_npobject_lifetime_test.h', - '../../glue/plugins/test/plugin_npobject_proxy_test.cc', - '../../glue/plugins/test/plugin_npobject_proxy_test.h', - '../../glue/plugins/test/plugin_schedule_timer_test.cc', - '../../glue/plugins/test/plugin_schedule_timer_test.h', - '../../glue/plugins/test/plugin_thread_async_call_test.cc', - '../../glue/plugins/test/plugin_thread_async_call_test.h', - '../../glue/plugins/test/plugin_windowed_test.cc', - '../../glue/plugins/test/plugin_windowed_test.h', - '../../glue/plugins/test/plugin_private_test.cc', - '../../glue/plugins/test/plugin_private_test.h', - '../../glue/plugins/test/plugin_test.cc', - '../../glue/plugins/test/plugin_test.h', - '../../glue/plugins/test/plugin_window_size_test.cc', - '../../glue/plugins/test/plugin_window_size_test.h', - '../../glue/plugins/test/plugin_windowless_test.cc', - '../../glue/plugins/test/plugin_windowless_test.h', - '../../glue/plugins/test/resource.h', - ], - 'include_dirs': [ - '../../..', - ], - 'xcode_settings': { - 'INFOPLIST_FILE': '../../glue/plugins/test/Info.plist', - }, - 'conditions': [ - ['OS!="win"', { - 'sources!': [ - # TODO(port): Port these. - # plugin_npobject_lifetime_test.cc has win32-isms - # (HWND, CALLBACK). + 'conditions': [ + ['OS!="win"', { + 'sources!': [ + '../npapi_layout_test_plugin/npapi_layout_test_plugin.def', + '../npapi_layout_test_plugin/npapi_layout_test_plugin.rc', + ], + # TODO(bradnelson): + # This copy should really live here, as a post-build step, + # but it's currently being implemented via + # AdditionalDependencies, which tries to do the copy before + # the file is built... + # + }, { # OS == "win" + # # The old VS build would explicitly copy the .dll into the + # # plugins subdirectory like this. It might be possible to + # # use the 'product_dir' setting to build directly into + # # plugins/ (as is done on Linux), but we'd need to verify + # # that nothing breaks first. + # 'copies': [ + # { + # 'destination': '<(PRODUCT_DIR)/plugins', + # 'files': ['<(PRODUCT_DIR)/npapi_layout_test_plugin.dll'], + # }, + # ], + 'link_settings': { + 'libraries': [ + "winmm.lib", + ], + }, + }], + ['OS=="mac"', { + 'product_name': 'TestNetscapePlugIn', + 'product_extension': 'plugin', + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Carbon.framework', + ], + }, + }], + ], + }, + { + 'target_name': 'npapi_test_plugin', + 'type': 'loadable_module', + 'mac_bundle': 1, + 'msvs_guid': '0D04AEC1-6B68-492C-BCCF-808DFD69ABC6', + 'dependencies': [ + '../../../base/base.gyp:base', + '../../../third_party/icu/icu.gyp:icuuc', + '../../../third_party/npapi/npapi.gyp:npapi', + ], + 'sources': [ + '../../glue/plugins/test/npapi_constants.cc', + '../../glue/plugins/test/npapi_constants.h', + '../../glue/plugins/test/npapi_test.cc', + '../../glue/plugins/test/npapi_test.def', + '../../glue/plugins/test/npapi_test.rc', + '../../glue/plugins/test/plugin_arguments_test.cc', + '../../glue/plugins/test/plugin_arguments_test.h', + '../../glue/plugins/test/plugin_client.cc', + '../../glue/plugins/test/plugin_client.h', + '../../glue/plugins/test/plugin_create_instance_in_paint.cc', + '../../glue/plugins/test/plugin_create_instance_in_paint.h', + '../../glue/plugins/test/plugin_delete_plugin_in_stream_test.cc', + '../../glue/plugins/test/plugin_delete_plugin_in_stream_test.h', + '../../glue/plugins/test/plugin_get_javascript_url_test.cc', + '../../glue/plugins/test/plugin_get_javascript_url_test.h', + '../../glue/plugins/test/plugin_get_javascript_url2_test.cc', + '../../glue/plugins/test/plugin_get_javascript_url2_test.h', + '../../glue/plugins/test/plugin_geturl_test.cc', + '../../glue/plugins/test/plugin_geturl_test.h', + '../../glue/plugins/test/plugin_javascript_open_popup.cc', + '../../glue/plugins/test/plugin_javascript_open_popup.h', + '../../glue/plugins/test/plugin_new_fails_test.cc', + '../../glue/plugins/test/plugin_new_fails_test.h', '../../glue/plugins/test/plugin_npobject_lifetime_test.cc', - # The windowed/windowless APIs are necessarily - # platform-specific. - '../../glue/plugins/test/plugin_window_size_test.cc', + '../../glue/plugins/test/plugin_npobject_lifetime_test.h', + '../../glue/plugins/test/plugin_npobject_proxy_test.cc', + '../../glue/plugins/test/plugin_npobject_proxy_test.h', + '../../glue/plugins/test/plugin_schedule_timer_test.cc', + '../../glue/plugins/test/plugin_schedule_timer_test.h', + '../../glue/plugins/test/plugin_thread_async_call_test.cc', + '../../glue/plugins/test/plugin_thread_async_call_test.h', '../../glue/plugins/test/plugin_windowed_test.cc', + '../../glue/plugins/test/plugin_windowed_test.h', + '../../glue/plugins/test/plugin_private_test.cc', + '../../glue/plugins/test/plugin_private_test.h', + '../../glue/plugins/test/plugin_test.cc', + '../../glue/plugins/test/plugin_test.h', + '../../glue/plugins/test/plugin_window_size_test.cc', + '../../glue/plugins/test/plugin_window_size_test.h', '../../glue/plugins/test/plugin_windowless_test.cc', - # Seems windows specific. - '../../glue/plugins/test/plugin_create_instance_in_paint.cc', - '../../glue/plugins/test/plugin_create_instance_in_paint.h', - # windows-specific resources - '../../glue/plugins/test/npapi_test.def', - '../../glue/plugins/test/npapi_test.rc', + '../../glue/plugins/test/plugin_windowless_test.h', + '../../glue/plugins/test/resource.h', ], - }], - ['OS=="mac"', { - 'link_settings': { - 'libraries': [ - '$(SDKROOT)/System/Library/Frameworks/Carbon.framework', - ], + 'include_dirs': [ + '../../..', + ], + 'xcode_settings': { + 'INFOPLIST_FILE': '../../glue/plugins/test/Info.plist', }, - }], - ['OS=="linux" and target_arch=="x64"', { - # Shared libraries need -fPIC on x86-64 - 'cflags': ['-fPIC'] - }], + 'conditions': [ + ['OS!="win"', { + 'sources!': [ + # TODO(port): Port these. + + # plugin_npobject_lifetime_test.cc has win32-isms + # (HWND, CALLBACK). + '../../glue/plugins/test/plugin_npobject_lifetime_test.cc', + + # The windowed/windowless APIs are necessarily + # platform-specific. + '../../glue/plugins/test/plugin_window_size_test.cc', + '../../glue/plugins/test/plugin_windowed_test.cc', + '../../glue/plugins/test/plugin_windowless_test.cc', + + # Seems windows specific. + '../../glue/plugins/test/plugin_create_instance_in_paint.cc', + '../../glue/plugins/test/plugin_create_instance_in_paint.h', + + # windows-specific resources + '../../glue/plugins/test/npapi_test.def', + '../../glue/plugins/test/npapi_test.rc', + ], + }], + ['OS=="mac"', { + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Carbon.framework', + ], + }, + }], + ], + }, ], - }, - ], - 'conditions': [ + }], ['OS=="linux"', { 'targets': [ { |