summaryrefslogtreecommitdiffstats
path: root/webkit/tools/npapi_layout_test_plugin
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 /webkit/tools/npapi_layout_test_plugin
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
Diffstat (limited to 'webkit/tools/npapi_layout_test_plugin')
-rw-r--r--webkit/tools/npapi_layout_test_plugin/main.cpp19
1 files changed, 3 insertions, 16 deletions
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;
}