Changeset 85019 in webkit


Ignore:
Timestamp:
Apr 26, 2011 10:54:29 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-04-26 Chang Shu <cshu@webkit.org>

Reviewed by Laszlo Gombos.

WebKitTestRunner needs layoutTestController.addOriginAccessWhitelistEntry
https://bugs.webkit.org/show_bug.cgi?id=42544

Unskip passed tests and place failing tests for other reasons to other sections.

  • platform/mac-wk2/Skipped:
  • platform/qt-wk2/Skipped:

2011-04-26 Chang Shu <cshu@webkit.org>

Reviewed by Laszlo Gombos.

WebKitTestRunner needs layoutTestController.addOriginAccessWhitelistEntry
https://bugs.webkit.org/show_bug.cgi?id=42544

Also implemented removeOriginAccessWhitelistEntry and resetOriginAccessWhitelists.

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleAddOriginAccessWhitelistEntry): (WKBundleRemoveOriginAccessWhitelistEntry): (WKBundleResetOriginAccessWhitelists):
  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::addOriginAccessWhitelistEntry): (WebKit::InjectedBundle::removeOriginAccessWhitelistEntry): (WebKit::InjectedBundle::resetOriginAccessWhitelists):
  • WebProcess/InjectedBundle/InjectedBundle.h:

2011-04-26 Chang Shu <cshu@webkit.org>

Reviewed by Laszlo Gombos.

WebKitTestRunner needs layoutTestController.addOriginAccessWhitelistEntry
https://bugs.webkit.org/show_bug.cgi?id=42544

Also implemented removeOriginAccessWhitelistEntry and resetOriginAccessWhitelists.

  • WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting):
  • WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::addOriginAccessWhitelistEntry): (WTR::LayoutTestController::removeOriginAccessWhitelistEntry):
  • WebKitTestRunner/InjectedBundle/LayoutTestController.h:
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r85018 r85019  
     12011-04-26  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Laszlo Gombos.
     4
     5        WebKitTestRunner needs layoutTestController.addOriginAccessWhitelistEntry
     6        https://bugs.webkit.org/show_bug.cgi?id=42544
     7
     8        Unskip passed tests and place failing tests for other reasons to other sections.
     9
     10        * platform/mac-wk2/Skipped:
     11        * platform/qt-wk2/Skipped:
     12
    1132011-04-26  Dirk Pranke  <dpranke@chromium.org>
    214
  • trunk/LayoutTests/platform/mac-wk2/Skipped

    r84941 r85019  
    11771177platform/mac/fast/loader/file-url-mimetypes.html
    11781178
    1179 # WebKitTestRunner needs layoutTestController.addOriginAccessWhitelistEntry
    1180 # <https://bugs.webkit.org/show_bug.cgi?id=42544>
    1181 http/tests/security/local-image-from-remote-whitelisted.html
    1182 http/tests/xmlhttprequest/origin-whitelisting-all.html
    1183 http/tests/xmlhttprequest/origin-whitelisting-exact-match.html
    1184 http/tests/xmlhttprequest/origin-whitelisting-https.html
    1185 http/tests/xmlhttprequest/origin-whitelisting-ip-addresses.html
    1186 http/tests/xmlhttprequest/origin-whitelisting-ip-addresses-with-subdomains.html
    1187 http/tests/xmlhttprequest/origin-whitelisting-removal.html
    1188 http/tests/xmlhttprequest/origin-whitelisting-subdomains.html
    1189 
    11901179# WebKitTestRunner needs layoutTestController.setGeolocationPermission
    11911180# <https://bugs.webkit.org/show_bug.cgi?id=42545>
  • trunk/LayoutTests/platform/qt-wk2/Skipped

    r84787 r85019  
    16171617http/tests/loading/preload-slow-loading.php
    16181618http/tests/mime/uppercase-mime-type.html
    1619 
    1620 # WebKitTestRunner needs layoutTestController.addOriginAccessWhitelistEntry
    1621 # <https://bugs.webkit.org/show_bug.cgi?id=42544>
    1622 http/tests/security/local-image-from-remote-whitelisted.html
    1623 http/tests/xmlhttprequest/origin-whitelisting-all.html
    1624 http/tests/xmlhttprequest/origin-whitelisting-exact-match.html
    1625 http/tests/xmlhttprequest/origin-whitelisting-https.html
    1626 http/tests/xmlhttprequest/origin-whitelisting-ip-addresses.html
    1627 http/tests/xmlhttprequest/origin-whitelisting-ip-addresses-with-subdomains.html
    1628 http/tests/xmlhttprequest/origin-whitelisting-removal.html
    1629 http/tests/xmlhttprequest/origin-whitelisting-subdomains.html
    16301619
    16311620# WebKitTestRunner needs layoutTestController.setGeolocationPermission
     
    28392828http/tests/security/xss-DENIED-xsl-document.xml
    28402829http/tests/xmlhttprequest/basic-auth-nopassword.html
     2830http/tests/xmlhttprequest/origin-whitelisting-all.html
     2831http/tests/xmlhttprequest/origin-whitelisting-exact-match.html
     2832http/tests/xmlhttprequest/origin-whitelisting-https.html
     2833http/tests/xmlhttprequest/origin-whitelisting-ip-addresses.html
     2834http/tests/xmlhttprequest/origin-whitelisting-ip-addresses-with-subdomains.html
     2835http/tests/xmlhttprequest/origin-whitelisting-removal.html
     2836http/tests/xmlhttprequest/origin-whitelisting-subdomains.html
    28412837http/tests/xmlviewer/dumpAsText/frames.html
    28422838platform/qt/fast/history/back-to-unreachable-url-then-forward.html
  • trunk/Source/WebKit2/ChangeLog

    r85003 r85019  
     12011-04-26  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Laszlo Gombos.
     4
     5        WebKitTestRunner needs layoutTestController.addOriginAccessWhitelistEntry
     6        https://bugs.webkit.org/show_bug.cgi?id=42544
     7
     8        Also implemented removeOriginAccessWhitelistEntry and resetOriginAccessWhitelists.
     9
     10        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     11        (WKBundleAddOriginAccessWhitelistEntry):
     12        (WKBundleRemoveOriginAccessWhitelistEntry):
     13        (WKBundleResetOriginAccessWhitelists):
     14        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
     15        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     16        (WebKit::InjectedBundle::addOriginAccessWhitelistEntry):
     17        (WebKit::InjectedBundle::removeOriginAccessWhitelistEntry):
     18        (WebKit::InjectedBundle::resetOriginAccessWhitelists):
     19        * WebProcess/InjectedBundle/InjectedBundle.h:
     20
    1212011-04-26  Dan Bernstein  <mitz@apple.com>
    222
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r84980 r85019  
    144144}
    145145
     146void WKBundleAddOriginAccessWhitelistEntry(WKBundleRef bundleRef, WKStringRef sourceOrigin, WKStringRef destinationProtocol, WKStringRef destinationHost, bool allowDestinationSubdomains)
     147{
     148    toImpl(bundleRef)->addOriginAccessWhitelistEntry(toImpl(sourceOrigin)->string(), toImpl(destinationProtocol)->string(), toImpl(destinationHost)->string(), allowDestinationSubdomains);
     149}
     150
     151void WKBundleRemoveOriginAccessWhitelistEntry(WKBundleRef bundleRef, WKStringRef sourceOrigin, WKStringRef destinationProtocol, WKStringRef destinationHost, bool allowDestinationSubdomains)
     152{
     153    toImpl(bundleRef)->removeOriginAccessWhitelistEntry(toImpl(sourceOrigin)->string(), toImpl(destinationProtocol)->string(), toImpl(destinationHost)->string(), allowDestinationSubdomains);
     154}
     155
     156void WKBundleResetOriginAccessWhitelists(WKBundleRef bundleRef)
     157{
     158    toImpl(bundleRef)->resetOriginAccessWhitelists();
     159}
     160
    146161void WKBundleReportException(JSContextRef context, JSValueRef exception)
    147162{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r84980 r85019  
    7575WK_EXPORT WKStringRef WKBundlePageSizeAndMarginsInPixels(WKBundleRef bundle, WKBundleFrameRef frameRef, int, int, int, int, int, int, int);
    7676WK_EXPORT bool WKBundleIsPageBoxVisible(WKBundleRef bundle, WKBundleFrameRef frameRef, int);
     77WK_EXPORT void WKBundleAddOriginAccessWhitelistEntry(WKBundleRef bundle, WKStringRef, WKStringRef, WKStringRef, bool);
     78WK_EXPORT void WKBundleRemoveOriginAccessWhitelistEntry(WKBundleRef bundle, WKStringRef, WKStringRef, WKStringRef, bool);
     79WK_EXPORT void WKBundleResetOriginAccessWhitelists(WKBundleRef bundle);
    7780
    7881#ifdef __cplusplus
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r84980 r85019  
    5050#include <WebCore/PageGroup.h>
    5151#include <WebCore/PrintContext.h>
     52#include <WebCore/SecurityOrigin.h>
    5253#include <WebCore/Settings.h>
    5354#include <wtf/OwnArrayPtr.h>
     
    133134    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
    134135        (*iter)->settings()->setFrameFlatteningEnabled(enabled);
     136}
     137
     138void InjectedBundle::addOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains)
     139{
     140    SecurityOrigin::addOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains);
     141}
     142
     143void InjectedBundle::removeOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains)
     144{
     145    SecurityOrigin::removeOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains);
     146}
     147
     148void InjectedBundle::resetOriginAccessWhitelists()
     149{
     150    SecurityOrigin::resetOriginAccessWhitelists();
    135151}
    136152
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r84980 r85019  
    9595    void setAllowFileAccessFromFileURLs(WebPageGroupProxy*, bool);
    9696    void setFrameFlatteningEnabled(WebPageGroupProxy*, bool);
     97    void addOriginAccessWhitelistEntry(const String&, const String&, const String&, bool);
     98    void removeOriginAccessWhitelistEntry(const String&, const String&, const String&, bool);
     99    void resetOriginAccessWhitelists();
    97100    int numberOfPages(WebFrame*, double, double);
    98101    int pageNumberForElementById(WebFrame*, const String&, double, double);
  • trunk/Tools/ChangeLog

    r85007 r85019  
     12011-04-26  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Laszlo Gombos.
     4
     5        WebKitTestRunner needs layoutTestController.addOriginAccessWhitelistEntry
     6        https://bugs.webkit.org/show_bug.cgi?id=42544
     7
     8        Also implemented removeOriginAccessWhitelistEntry and resetOriginAccessWhitelists.
     9
     10        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
     11        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
     12        (WTR::InjectedBundle::beginTesting):
     13        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
     14        (WTR::LayoutTestController::addOriginAccessWhitelistEntry):
     15        (WTR::LayoutTestController::removeOriginAccessWhitelistEntry):
     16        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
     17
    1182011-04-26  Chris Fleizach  <cfleizach@apple.com>
    219
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl

    r84721 r85019  
    5151        void setAllowFileAccessFromFileURLs(in boolean value);
    5252        void setFrameFlatteningEnabled(in boolean value);
     53        void addOriginAccessWhitelistEntry(in DOMString sourceOrigin, in DOMString destinationProtocol, in DOMString destinationHost, in boolean allowDestinationSubdomains);
     54        void removeOriginAccessWhitelistEntry(in DOMString sourceOrigin, in DOMString destinationProtocol, in DOMString destinationHost, in boolean allowDestinationSubdomains);
    5355
    5456        // Special DOM functions.
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

    r84980 r85019  
    185185
    186186    WKBundleClearAllDatabases(m_bundle);
     187    WKBundleResetOriginAccessWhitelists(m_bundle);
    187188}
    188189
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp

    r84980 r85019  
    332332}
    333333
     334void LayoutTestController::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
     335{
     336    WKBundleAddOriginAccessWhitelistEntry(InjectedBundle::shared().bundle(), toWK(sourceOrigin).get(), toWK(destinationProtocol).get(), toWK(destinationHost).get(), allowDestinationSubdomains);
     337}
     338
     339void LayoutTestController::removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
     340{
     341    WKBundleRemoveOriginAccessWhitelistEntry(InjectedBundle::shared().bundle(), toWK(sourceOrigin).get(), toWK(destinationProtocol).get(), toWK(destinationHost).get(), allowDestinationSubdomains);
     342}
     343
    334344int LayoutTestController::numberOfPages(double pageWidthInPixels, double pageHeightInPixels)
    335345{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

    r84721 r85019  
    7979    void setAllowFileAccessFromFileURLs(bool);
    8080    void setFrameFlatteningEnabled(bool);
     81    void addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
     82    void removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
    8183
    8284    // Special DOM functions.
Note: See TracChangeset for help on using the changeset viewer.