diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-01 21:07:59 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-01 21:07:59 +0000 |
commit | 0d3558373b8f6c31d3a5c735310b27f4ad661490 (patch) | |
tree | f14d73b5e745a5e1f6faadb21ae92f8bd84edce1 /webkit | |
parent | 4dab725746e1cea9430833de820d27999b5f0c43 (diff) | |
download | chromium_src-0d3558373b8f6c31d3a5c735310b27f4ad661490.zip chromium_src-0d3558373b8f6c31d3a5c735310b27f4ad661490.tar.gz chromium_src-0d3558373b8f6c31d3a5c735310b27f4ad661490.tar.bz2 |
Companion change to https://bugs.webkit.org/show_bug.cgi?id=15457. Add logging to the layout test plugin and add the expected output (the line number is off by 1 from the WebKit due to some difference in v8).
Review URL: http://codereview.chromium.org/118486
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19762 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
5 files changed, 17 insertions, 35 deletions
diff --git a/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/plugins/netscape-plugin-map-data-to-src-expected.txt b/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/plugins/netscape-plugin-map-data-to-src-expected.txt new file mode 100644 index 0000000..f4da632 --- /dev/null +++ b/webkit/data/layout_tests/platform/chromium-mac/LayoutTests/plugins/netscape-plugin-map-data-to-src-expected.txt @@ -0,0 +1,3 @@ +CONSOLE MESSAGE: line 1: PLUGIN: src: blah + +This tests that an object tag with a data attribute gets a src attribute as well. diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/plugins/netscape-plugin-map-data-to-src-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/plugins/netscape-plugin-map-data-to-src-expected.txt new file mode 100644 index 0000000..f4da632 --- /dev/null +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/plugins/netscape-plugin-map-data-to-src-expected.txt @@ -0,0 +1,3 @@ +CONSOLE MESSAGE: line 1: PLUGIN: src: blah + +This tests that an object tag with a data attribute gets a src attribute as well. diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc index e99813e..58fe059 100644 --- a/webkit/glue/webframeloaderclient_impl.cc +++ b/webkit/glue/webframeloaderclient_impl.cc @@ -1400,40 +1400,9 @@ Widget* WebFrameLoaderClient::createPlugin(const IntSize& size, // TODO(erikkay) DCHECK(param_names.size() == param_values.size()); - char **argn = NULL; - char **argv = NULL; - int argc = 0; - // There is a bug in Webkit which occurs when a plugin instance is defined - // with an OBJECT tag containing the "DATA" attribute". Please refer to the - // webkit issue http://bugs.webkit.org/show_bug.cgi?id=15457 for more info. - // The code below is a patch which should be taken out when a fix is - // available in webkit. The logic is to add the "src" attribute to the list - // of params if the "data" attribute exists. - // TODO(iyengar) : remove this when a fix is available in webkit. - int data_attr_index = -1; - int src_attr_index = -1; - for (unsigned int i = 0; i < param_names.size(); i++) { - String param_name = param_names[i].lower(); - if (param_name == "data") - data_attr_index = i; - else if (param_name == "src") - src_attr_index = i; - } - if ((data_attr_index != -1) && (src_attr_index == -1)) { - Vector<String> updated_param_names = param_names; - Vector<String> updated_param_values = param_values; - updated_param_names.append("src"); - updated_param_values.append(param_values[data_attr_index]); - - argn = ToArray(updated_param_names); - argv = ToArray(updated_param_values); - argc = static_cast<int>(updated_param_names.size()); - } else { - argn = ToArray(param_names); - argv = ToArray(param_values); - argc = static_cast<int>(param_names.size()); - } - + char **argn = ToArray(param_names); + char **argv = ToArray(param_values); + int argc = static_cast<int>(param_names.size()); Widget* result = WebPluginImpl::Create(gurl, argn, argv, argc, element, webframe_, plugin_delegate, load_manually, my_mime_type); diff --git a/webkit/tools/layout_tests/test_expectations.txt b/webkit/tools/layout_tests/test_expectations.txt index 374f15c..39955bc 100644 --- a/webkit/tools/layout_tests/test_expectations.txt +++ b/webkit/tools/layout_tests/test_expectations.txt @@ -2842,7 +2842,6 @@ BUG15425 WIN : LayoutTests/dom/html/level2/html/HTMLElement142.html = PASS CRASH // WebKit 45287:45352 New tests BUG15649 : LayoutTests/compositing/layers-inside-overflow-scroll.html = TIMEOUT FAIL BUG15649 : LayoutTests/compositing/self-painting-layers.html = TIMEOUT -BUG15649 : LayoutTests/plugins/netscape-plugin-map-data-to-src.html = FAIL BUG15649 : LayoutTests/media/video-canvas-source.html = FAIL // WebKit 45381:45403 Need to rebaseline diff --git a/webkit/tools/npapi_layout_test_plugin/main.cpp b/webkit/tools/npapi_layout_test_plugin/main.cpp index 0457ec4..a85af00 100644 --- a/webkit/tools/npapi_layout_test_plugin/main.cpp +++ b/webkit/tools/npapi_layout_test_plugin/main.cpp @@ -160,6 +160,14 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, ch obj->onURLNotify = strdup(argv[i]); else if (strcasecmp(argn[i], "logfirstsetwindow") == 0) obj->logSetWindow = TRUE; + else if (strcasecmp(argn[i], "logSrc") == 0) { + for (int i = 0; i < argc; i++) { + if (strcasecmp(argn[i], "src") == 0) { + log(instance, "src: %s", argv[i]); + fflush(stdout); + } + } + } } instance->pdata = obj; |