summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-09 16:53:56 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-09 16:53:56 +0000
commitd1db6fb15fdb8ae49a105965a3cff698b6e354c4 (patch)
treee87c9afcf21b58d680b74df4643b962e22288227
parent32ce685ef6d93b325133ffea5d3e683629779719 (diff)
downloadchromium_src-d1db6fb15fdb8ae49a105965a3cff698b6e354c4.zip
chromium_src-d1db6fb15fdb8ae49a105965a3cff698b6e354c4.tar.gz
chromium_src-d1db6fb15fdb8ae49a105965a3cff698b6e354c4.tar.bz2
This fixes the pending/plugins/destroy-stream-twice layout test, which regressed during the merge with the upstream layout test plugin code.
We were invoking the onStreamLoad function twice in the test, which caused this test to fail. R=deanm Review URL: http://codereview.chromium.org/6383 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3102 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/tools/layout_tests/test_lists/tests_fixable.txt2
-rw-r--r--webkit/tools/npapi_layout_test_plugin/main.cpp19
2 files changed, 3 insertions, 18 deletions
diff --git a/webkit/tools/layout_tests/test_lists/tests_fixable.txt b/webkit/tools/layout_tests/test_lists/tests_fixable.txt
index 0548256..0d9acb8 100644
--- a/webkit/tools/layout_tests/test_lists/tests_fixable.txt
+++ b/webkit/tools/layout_tests/test_lists/tests_fixable.txt
@@ -1285,8 +1285,6 @@ V8 | KJS # LayoutTests/fast/dom/gc-1.html = CRASH | PASS
V8 | KJS # LayoutTests/http/tests/navigation/redirect302-subframeload.html = FAIL | PASS
V8 | KJS # LayoutTests/http/tests/navigation/relativeanchor-basic.html = FAIL | PASS
-// This one fails consistently after http://codereview.chromium.org/6272.
-V8 # pending/plugins/destroy-stream-twice.html = FAIL
// This one is flakey and might be related.
V8 # LayoutTests/http/tests/plugins/geturlnotify-from-npp-destroystream.html = FAIL | PASS
diff --git a/webkit/tools/npapi_layout_test_plugin/main.cpp b/webkit/tools/npapi_layout_test_plugin/main.cpp
index ccfe2aa..dce0e3d 100644
--- a/webkit/tools/npapi_layout_test_plugin/main.cpp
+++ b/webkit/tools/npapi_layout_test_plugin/main.cpp
@@ -178,25 +178,12 @@ NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, NPBool se
obj->stream = stream;
*stype = NP_ASFILEONLY;
- if (obj->onStreamLoad)
- executeScript(obj, obj->onStreamLoad);
-
if (browser->version >= NPVERS_HAS_RESPONSE_HEADERS)
notifyStream(obj, stream->url, stream->headers);
- if (obj->onStreamLoad) {
- NPObject *windowScriptObject;
- browser->getvalue(obj->npp, NPNVWindowNPObject, &windowScriptObject);
-
- NPString script;
- script.UTF8Characters = obj->onStreamLoad;
- script.UTF8Length = strlen(obj->onStreamLoad);
-
- NPVariant browserResult;
- browser->evaluate(obj->npp, windowScriptObject, &script, &browserResult);
- browser->releasevariantvalue(&browserResult);
- }
-
+ if (obj->onStreamLoad)
+ executeScript(obj, obj->onStreamLoad);
+
return NPERR_NO_ERROR;
}