Changeset 64504 in webkit


Ignore:
Timestamp:
Aug 2, 2010 4:39:50 PM (14 years ago)
Author:
andersca@apple.com
Message:

Fix plug-in test failures and remove tests from the Skipped list
https://bugs.webkit.org/show_bug.cgi?id=43389

Reviewed by Sam Weinig.

WebCore:

  • WebCore.exp.in:

Export FrameLoader::cancelledError.

WebKit2:

  • WebProcess/Plugins/JSNPMethod.cpp:

JSNPMethod::s_info should specify InternalFunction::info as its parent.

  • WebProcess/Plugins/Netscape/NetscapePlugin.cpp:

(WebKit::NetscapePlugin::cancelStreamLoad):
Special-case the manual stream and call PluginController::cancelManualStreamLoad.

  • WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:

(WebKit::NetscapePluginStream::stop):
It's OK to call stop on a stream that hasn't been started. Remove assertion and return early.

  • WebProcess/Plugins/PluginController.h:

Add cancelManualStreamLoad.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::cancelManualStreamLoad):
Tell the document loader to cancel the main resource load.

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::innerText):
Check for a null document element.

LayoutTests:

  • platform/mac-wk2/Skipped:

Move plug-in tests that now fail due to lack of functionality out into appropriate sections.

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r64503 r64504  
     12010-08-02  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Fix plug-in test failures and remove tests from the Skipped list
     6        https://bugs.webkit.org/show_bug.cgi?id=43389
     7
     8        * platform/mac-wk2/Skipped:
     9        Move plug-in tests that now fail due to lack of functionality out into appropriate sections.
     10
    1112010-08-02  Jon Honeycutt  <jhoneycutt@apple.com>
    212
  • trunk/LayoutTests/platform/mac-wk2/Skipped

    r64501 r64504  
    10631063platform/mac/fast/overflow/overflow-scrollbar-hit-test.html
    10641064plugins/createScriptableObject-before-start.html
     1065plugins/destroy-during-npp-new.html
     1066plugins/resize-from-plugin.html
    10651067scrollbars/scrollbar-iframe-click-does-not-blur-content.html
    10661068scrollbars/scrollbar-middleclick-nopaste.html
     
    14571459http/tests/security/xssAuditor/script-tag.html
    14581460http/tests/security/xssAuditor/xss-protection-parsing-01.html
     1461plugins/js-from-destroy.html
    14591462
    14601463# WebKit2 needs plugins support
     
    14671470http/tests/misc/acid2-pixel.html
    14681471http/tests/misc/acid2.html
    1469 http/tests/plugins
    14701472java
    1471 platform/mac/plugins
    1472 plugins/attach-during-destroy.html
    1473 plugins/clicking-missing-plugin-fires-delegate.html
    1474 plugins/destroy-during-npp-new.html
    1475 plugins/destroy-reentry.html
    1476 plugins/destroy-stream-twice.html
    1477 plugins/embed-attributes-setting.html
    1478 plugins/embed-attributes-style.html
    1479 plugins/embed-inside-object.html
    1480 plugins/get-empty-url.html
    1481 plugins/get-file-url.html
    1482 plugins/get-url-that-the-resource-load-delegate-will-disallow.html
    1483 plugins/get-url-with-blank-target.html
    1484 plugins/get-url-with-iframe-target.html
    1485 plugins/geturl-replace-query.html
    1486 plugins/iframe-shims.html
    1487 plugins/inner-html-display-none.html
    1488 plugins/instance-available-before-stylesheets-loaded-object.html
    1489 plugins/instance-available-before-stylesheets-loaded.html
    1490 plugins/js-from-destroy.html
    1491 plugins/missing-plugin.html
    1492 plugins/netscape-plugin-map-data-to-src.html
    1493 plugins/netscape-plugin-setwindow-size-2.html
    1494 plugins/netscape-plugin-setwindow-size.html
    1495 plugins/plugin-remove-subframe.html
    1496 plugins/reentrant-update-widget-positions.html
    1497 plugins/reloadplugins-no-pages.html
    1498 plugins/resize-from-plugin.html
    1499 plugins/return-error-from-new-stream-callback-in-full-frame-plugin.html
    1500 plugins/return-error-from-new-stream-doesnt-invoke-destroy-stream.html
    1501 plugins/return-negative-one-from-write.html
    1502 plugins/update-widgets-crash.html
    1503 plugins/window-open.html
    15041473
    15051474# WebKit2 needs layoutTestController.overridePreference
     
    20562025# <https://bugs.webkit.org/show_bug.cgi?id=42541>
    20572026fast/loader/local-CSS-from-local.html
    2058 fast/loader/local-JavaScript-from-local.html
    20592027fast/loader/local-iFrame-source-from-local.html
    20602028fast/loader/local-image-from-local.html
     2029fast/loader/local-JavaScript-from-local.html
     2030http/tests/plugins/post-url-file.html
    20612031http/tests/security/frame-loading-via-document-write.html
    20622032http/tests/security/local-CSS-from-remote.html
    2063 http/tests/security/local-JavaScript-from-remote.html
    20642033http/tests/security/local-iFrame-from-remote.html
    20652034http/tests/security/local-image-from-remote.html
     2035http/tests/security/local-JavaScript-from-remote.html
    20662036http/tests/security/local-video-poster-from-remote.html
    20672037http/tests/security/local-video-source-from-remote.html
     
    22282198editing/selection/4975120.html
    22292199fast/events/show-modal-dialog-onblur-onfocus.html
     2200plugins/netscape-plugin-setwindow-size-2.html
    22302201
    22312202# WebKitTestRunner needs layoutTestController.setEditingBehavior
     
    22932264# <https://bugs.webkit.org/show_bug.cgi?id=42778>
    22942265http/tests/cookies/third-party-cookie-relaxing.html
     2266http/tests/plugins/third-party-cookie-accept-policy.html
    22952267
    22962268# WebKitTestRunner needs GCController
     
    23622334fast/events/onbeforeunload-focused-iframe.html
    23632335
     2336# WebKitTestRunner needs layoutTestController.setPluginsEnabled
     2337platform/mac/plugins/disable-plugins.html
     2338
    23642339# WebKitTestRunner needs layoutTestController.setHandlesAuthenticationChallenges
    23652340http/tests/loading/basic-auth-resend-wrong-credentials.html
     
    23892364fast/events/popup-blocked-from-fake-user-gesture.html
    23902365fast/events/popup-blocked-to-post-blank.html
     2366
     2367# WebKitTestRunner needs layoutTestController.addDisallowedURL
     2368plugins/get-url-that-the-resource-load-delegate-will-disallow.html
     2369
     2370# WebKitTestRunner gets confused by location.href redirects.
     2371plugins/attach-during-destroy.html
     2372plugins/destroy-reentry.html
    23912373
    23922374# WebKit2 needs support for moving/resizing and querying the location/size the window
     
    24562438storage/domstorage/events/case-sensitive.html
    24572439storage/domstorage/events/documentURI.html
     2440
     2441# WebKit2 doesn't have a missing plug-in delegate
     2442plugins/clicking-missing-plugin-fires-delegate.html
     2443
     2444# These are plug-in tests that use Flash or QuickTime. We should convert these to use the test plug-in.
     2445plugins/embed-attributes-setting.html
     2446plugins/iframe-shims.html
     2447
     2448# This test checks that NPN_GetURL with a blank target will return an error if the window isn't opened. This behavior doesn't
     2449# match Firefox or Chrome. We should either fix the test, or get rid of it.
     2450plugins/get-url-with-blank-target.html
    24582451
    24592452# Unexplained failures that were formerly in the dumpChildFramesAsText list.
     
    26232616platform/mac/fast/objc/longlongTest.html
    26242617platform/mac/fast/objc/webScriptObject-hasWebScriptKey.html
     2618platform/mac/plugins/bindings-array-apply-crash.html
    26252619platform/mac/plugins/bindings-test-objc.html
     2620platform/mac/plugins/call-as-function-test.html
     2621platform/mac/plugins/root-object-premature-delete-crash.html
     2622platform/mac/plugins/undefined-property-crash.html
     2623platform/mac/plugins/webScriptObject-exception-deadlock.html
    26262624
    26272625# WebKitTestRunner doesn't have objCPlugin
    26282626platform/mac/editing/pasteboard/5583362.html
     2627platform/mac/plugins/jsobjc-dom-wrappers.html
     2628platform/mac/plugins/jsobjc-simple.html
     2629platform/mac/plugins/throw-on-dealloc.html
    26292630
    26302631# WebKitTestRunner doesn't have eventSender.enableDOMUIEventLogging
  • trunk/WebCore/ChangeLog

    r64492 r64504  
     12010-08-02  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Fix plug-in test failures and remove tests from the Skipped list
     6        https://bugs.webkit.org/show_bug.cgi?id=43389
     7
     8        * WebCore.exp.in:
     9        Export FrameLoader::cancelledError.
     10
    1112010-08-02  Brady Eidson  <beidson@apple.com>
    212
  • trunk/WebCore/WebCore.exp.in

    r64492 r64504  
    850850__ZNK7WebCore11CachedImage5imageEv
    851851__ZNK7WebCore11FrameLoader10isCompleteEv
     852__ZNK7WebCore11FrameLoader14cancelledErrorERKNS_15ResourceRequestE
    852853__ZNK7WebCore11FrameLoader14frameHasLoadedEv
    853854__ZNK7WebCore11FrameLoader16outgoingReferrerEv
  • trunk/WebKit2/ChangeLog

    r64494 r64504  
     12010-08-02  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Fix plug-in test failures and remove tests from the Skipped list
     6        https://bugs.webkit.org/show_bug.cgi?id=43389
     7
     8        * WebProcess/Plugins/JSNPMethod.cpp:
     9        JSNPMethod::s_info should specify InternalFunction::info as its parent.
     10
     11        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
     12        (WebKit::NetscapePlugin::cancelStreamLoad):
     13        Special-case the manual stream and call PluginController::cancelManualStreamLoad.
     14
     15        * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
     16        (WebKit::NetscapePluginStream::stop):
     17        It's OK to call stop on a stream that hasn't been started. Remove assertion and return early.
     18       
     19        * WebProcess/Plugins/PluginController.h:
     20        Add cancelManualStreamLoad.
     21
     22        * WebProcess/Plugins/PluginView.cpp:
     23        (WebKit::PluginView::cancelManualStreamLoad):
     24        Tell the document loader to cancel the main resource load.
     25
     26        * WebProcess/WebPage/WebFrame.cpp:
     27        (WebKit::WebFrame::innerText):
     28        Check for a null document element.
     29
    1302010-08-02  Anders Carlsson  <andersca@apple.com>
    231
  • trunk/WebKit2/WebProcess/Plugins/JSNPMethod.cpp

    r64231 r64504  
    3939namespace WebKit {
    4040
    41 const ClassInfo JSNPMethod::s_info = { "NPMethod", 0, 0, 0 };
     41const ClassInfo JSNPMethod::s_info = { "NPMethod", &InternalFunction::info, 0, 0 };
    4242
    4343JSNPMethod::JSNPMethod(ExecState* exec, JSGlobalObject* globalObject, const Identifier& name, NPIdentifier npIdentifier)
  • trunk/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp

    r64494 r64504  
    175175void NetscapePlugin::cancelStreamLoad(NetscapePluginStream* pluginStream)
    176176{
     177    if (pluginStream == m_manualStream) {
     178        m_pluginController->cancelManualStreamLoad();
     179        return;
     180    }
     181
    177182    // Ask the plug-in controller to cancel this stream load.
    178183    m_pluginController->cancelStreamLoad(pluginStream->streamID());
  • trunk/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp

    r63756 r64504  
    276276void NetscapePluginStream::stop(NPReason reason)
    277277{
    278     ASSERT(m_isStarted);
     278    // The stream was stopped before it got a chance to start. This can happen if a stream is cancelled by
     279    // WebKit before it received a response.
     280    if (!m_isStarted)
     281        return;
    279282
    280283    if (reason == NPRES_DONE && m_deliveryData && !m_deliveryData->isEmpty()) {
  • trunk/WebKit2/WebProcess/Plugins/PluginController.h

    r64377 r64504  
    6060    virtual void cancelStreamLoad(uint64_t streamID) = 0;
    6161
     62    // Cancels the load of the manual stream.
     63    virtual void cancelManualStreamLoad() = 0;
     64
    6265    // Get the NPObject that corresponds to the window JavaScript object. Returns a retained object.
    6366    virtual NPObject* windowScriptNPObject() = 0;
  • trunk/WebKit2/WebProcess/Plugins/PluginView.cpp

    r64494 r64504  
    665665}
    666666
     667void PluginView::cancelManualStreamLoad()
     668{
     669    if (!frame())
     670        return;
     671
     672    DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader();
     673    ASSERT(documentLoader);
     674   
     675    if (documentLoader->isLoadingMainResource())
     676        documentLoader->cancelMainResourceLoad(frame()->loader()->cancelledError(m_parameters.url));
     677}
     678
    667679NPObject* PluginView::windowScriptNPObject()
    668680{
  • trunk/WebKit2/WebProcess/Plugins/PluginView.h

    r64494 r64504  
    109109                         const WebCore::HTTPHeaderMap& headerFields, const Vector<char>& httpBody, bool allowPopups);
    110110    virtual void cancelStreamLoad(uint64_t streamID);
     111    virtual void cancelManualStreamLoad();
    111112    virtual NPObject* windowScriptNPObject();
    112113    virtual NPObject* pluginElementNPObject();
  • trunk/WebKit2/WebProcess/WebPage/WebFrame.cpp

    r64426 r64504  
    191191        return String();
    192192
     193    if (!m_coreFrame->document()->documentElement())
     194        return String();
     195
    193196    return m_coreFrame->document()->documentElement()->innerText();
    194197}
Note: See TracChangeset for help on using the changeset viewer.