2011-05-13  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        NPP_URLNotify is not called if a URL passed to NPN_GetURLNotify fails to load
        https://bugs.webkit.org/show_bug.cgi?id=60823
        <rdar://problem/9430386>

        Add test that calls NPN_GetURLNotify on a URL that can't be loaded, and checks if NPP_URLNotify is called.

        * DumpRenderTree/DumpRenderTree.gypi:
        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
        * DumpRenderTree/TestNetscapePlugIn/Tests/GetURLNotifyWithURLThatFailsToLoad.cpp: Added.
        (GetURLNotifyWithURLThatFailsToLoad::GetURLNotifyWithURLThatFailsToLoad):
        (GetURLNotifyWithURLThatFailsToLoad::NPP_New):
        (GetURLNotifyWithURLThatFailsToLoad::NPP_URLNotify):
        * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
        * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
        * GNUmakefile.am:
2011-05-13  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        NPP_URLNotify is not called if a URL passed to NPN_GetURLNotify fails to load
        https://bugs.webkit.org/show_bug.cgi?id=60823
        <rdar://problem/9430386>

        Add test.

        * plugins/get-url-notify-with-url-that-fails-to-load-expected.txt: Added.
        * plugins/get-url-notify-with-url-that-fails-to-load.html: Added.
2011-05-13  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        NPP_URLNotify is not called if a URL passed to NPN_GetURLNotify fails to load
        https://bugs.webkit.org/show_bug.cgi?id=60823
        <rdar://problem/9430386>

        If a plug-in stream fails to load before it's been started, we won't destroy the stream.

        * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
        (WebKit::NetscapePluginStream::stop):
        Call notifyAndDestroyStream which will call NPP_URLNotify if necessary, and also destroy the stream.

        (WebKit::NetscapePluginStream::notifyAndDestroyStream):
        Pass the request URL to NPP_URLNotify, matching other browsers.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed