Changeset 105884 in webkit


Ignore:
Timestamp:
Jan 25, 2012 9:21:33 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[WK2] WebKitTestRunner needs layoutTestController.setPopupBlockingEnabled
https://bugs.webkit.org/show_bug.cgi?id=63458

Patch by Nándor Huszka <huszka.nandor@stud.u-szeged.hu> on 2012-01-25
Reviewed by Adam Roben.

Source/WebKit2:

Implement the setPopupBlockingEnabled method.

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleSetPrivateBrowsingEnabled):
(WKBundleSetPopupBlockingEnabled):

  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::setPopupBlockingEnabled):

  • WebProcess/InjectedBundle/InjectedBundle.h:

Tools:

Implement the setPopupBlockingEnabled method.

  • WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
  • WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:

(WTR::LayoutTestController::setPopupBlockingEnabled):

  • WebKitTestRunner/InjectedBundle/LayoutTestController.h:

LayoutTests:

Unskip tests which do not fail now.

  • platform/wk2/Skipped:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r105882 r105884  
     12012-01-25  Nándor Huszka  <huszka.nandor@stud.u-szeged.hu>
     2
     3        [WK2] WebKitTestRunner needs layoutTestController.setPopupBlockingEnabled
     4        https://bugs.webkit.org/show_bug.cgi?id=63458
     5
     6        Reviewed by Adam Roben.
     7
     8        Unskip tests which do not fail now.
     9
     10        * platform/wk2/Skipped:
     11
    1122012-01-25  Philippe Normand  <pnormand@igalia.com>
    213
  • trunk/LayoutTests/platform/wk2/Skipped

    r105852 r105884  
    875875http/tests/security/contentSecurityPolicy/block-mixed-content-hides-warning.html
    876876
    877 # WebKitTestRunner needs layoutTestController.setPopupBlockingEnabled
    878 # https://bugs.webkit.org/show_bug.cgi?id=63458
    879 fast/events/popup-blocked-from-untrusted-click-event-on-anchor.html
    880 fast/events/popup-blocked-from-iframe-src.html
    881 fast/events/popup-allowed-from-gesture-initiated-event.html
    882 fast/events/popup-allowed-from-gesture-initiated-form-submit.html
    883 fast/events/popup-blocked-from-fake-button-click.html
    884 fast/events/popup-blocked-from-fake-focus.html
    885 fast/events/popup-blocked-from-fake-user-gesture.html
    886 fast/events/popup-blocked-from-history-reload.html
    887 fast/events/popup-blocked-from-iframe-script.html
    888 fast/events/popup-blocked-from-mousemove.html
    889 fast/events/popup-blocked-from-untrusted-mouse-click.html
    890 fast/events/popup-blocked-from-window-open.html
    891 fast/events/popup-blocked-to-post-blank.html
    892 fast/events/popup-blocking-timers.html
    893 plugins/plugin-initiate-popup-window.html
    894 
    895877# WebKitTestRunner needs an implementation of allowRoundingHacks
    896878# http://webkit.org/b/63477
     
    12421224fast/dom/Window/window-appendages-cleared.html
    12431225fast/dom/tab-in-right-alignment.html
     1226fast/events/popup-blocked-from-fake-user-gesture.html
    12441227fast/frames/frame-element-name.html
    12451228fast/frames/iframe-onload-remove-self-no-crash.html
     
    12811264platform/mac/fast/loader/non-html-load-event.html
    12821265plugins/embed-attributes-style.html
     1266plugins/plugin-initiate-popup-window.html
    12831267storage/open-database-while-transaction-in-progress.html
    12841268svg/custom/clip-path-referencing-use2.svg
  • trunk/Source/WebKit2/ChangeLog

    r105881 r105884  
     12012-01-25  Nándor Huszka  <huszka.nandor@stud.u-szeged.hu>
     2
     3        [WK2] WebKitTestRunner needs layoutTestController.setPopupBlockingEnabled
     4        https://bugs.webkit.org/show_bug.cgi?id=63458
     5
     6        Reviewed by Adam Roben.
     7
     8        Implement the setPopupBlockingEnabled method.
     9
     10        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     11        (WKBundleSetPrivateBrowsingEnabled):
     12        (WKBundleSetPopupBlockingEnabled):
     13        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
     14        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     15        (WebKit::InjectedBundle::setPopupBlockingEnabled):
     16        * WebProcess/InjectedBundle/InjectedBundle.h:
     17
    1182012-01-25  Yael Aharon  <yael.aharon@nokia.com>
    219
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r102484 r105884  
    157157}
    158158
     159void WKBundleSetPopupBlockingEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
     160{
     161    toImpl(bundleRef)->setPopupBlockingEnabled(toImpl(pageGroupRef), enabled);
     162}
     163
    159164void WKBundleSwitchNetworkLoaderToNewTestingSession(WKBundleRef bundleRef)
    160165{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r96405 r105884  
    7171WK_EXPORT void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
    7272WK_EXPORT void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
     73WK_EXPORT void WKBundleSetPopupBlockingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
    7374WK_EXPORT void WKBundleSetAuthorAndUserStylesEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
    7475WK_EXPORT void WKBundleClearAllDatabases(WKBundleRef bundle);
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r102484 r105884  
    160160}
    161161
     162void InjectedBundle::setPopupBlockingEnabled(WebPageGroupProxy* pageGroup, bool enabled)
     163{
     164    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
     165    HashSet<Page*>::const_iterator end = pages.end();
     166    for (HashSet<Page*>::const_iterator iter = pages.begin(); iter != end; ++iter)
     167        (*iter)->settings()->setJavaScriptCanOpenWindowsAutomatically(!enabled);
     168}
     169
    162170void InjectedBundle::switchNetworkLoaderToNewTestingSession()
    163171{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r102484 r105884  
    104104    void setJavaScriptCanAccessClipboard(WebPageGroupProxy*, bool);
    105105    void setPrivateBrowsingEnabled(WebPageGroupProxy*, bool);
     106    void setPopupBlockingEnabled(WebPageGroupProxy*, bool);
    106107    void switchNetworkLoaderToNewTestingSession();
    107108    void setAuthorAndUserStylesEnabled(WebPageGroupProxy*, bool);
  • trunk/Tools/ChangeLog

    r105876 r105884  
     12012-01-25  Nándor Huszka  <huszka.nandor@stud.u-szeged.hu>
     2
     3        [WK2] WebKitTestRunner needs layoutTestController.setPopupBlockingEnabled
     4        https://bugs.webkit.org/show_bug.cgi?id=63458
     5
     6        Reviewed by Adam Roben.
     7
     8        Implement the setPopupBlockingEnabled method.
     9
     10        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
     11        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
     12        (WTR::LayoutTestController::setPopupBlockingEnabled):
     13        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
     14
    1152012-01-24  Balazs Kelemen  <kbalazs@webkit.org>
    216
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl

    r100488 r105884  
    5555        void setJavaScriptCanAccessClipboard(in boolean value);
    5656        void setPrivateBrowsingEnabled(in boolean value);
     57        void setPopupBlockingEnabled(in boolean value);
    5758        void setAuthorAndUserStylesEnabled(in boolean value);
    5859        void addOriginAccessWhitelistEntry(in DOMString sourceOrigin, in DOMString destinationProtocol, in DOMString destinationHost, in boolean allowDestinationSubdomains);
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp

    r97407 r105884  
    379379}
    380380
     381void LayoutTestController::setPopupBlockingEnabled(bool enabled)
     382{
     383     WKBundleSetPopupBlockingEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
     384}
     385
    381386void LayoutTestController::setAuthorAndUserStylesEnabled(bool enabled)
    382387{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

    r100488 r105884  
    8686    void setJavaScriptCanAccessClipboard(bool);
    8787    void setPrivateBrowsingEnabled(bool);
     88    void setPopupBlockingEnabled(bool);
    8889    void setAuthorAndUserStylesEnabled(bool);
    8990    void setCustomPolicyDelegate(bool enabled, bool permissive = false);
Note: See TracChangeset for help on using the changeset viewer.