Changeset 82848 in webkit


Ignore:
Timestamp:
Apr 4, 2011 11:29:22 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

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

Reviewed by Darin Adler.

WebKitTestRunner needs layoutTestController.setAllowFileAccessFromFileURLs
https://bugs.webkit.org/show_bug.cgi?id=57572

Unskip passed tests.

  • platform/mac-wk2/Skipped:

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

Reviewed by Darin Adler.

WebKitTestRunner needs layoutTestController.setAllowFileAccessFromFileURLs
https://bugs.webkit.org/show_bug.cgi?id=57572

  • Shared/WebPreferencesStore.cpp: (WebKit::WebPreferencesStore::decode): (WebKit::WebPreferencesStore::overrideAllowFileAccessFromFileURLsForTestRunner):
  • Shared/WebPreferencesStore.h:
  • WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetAllowFileAccessFromFileURLs):
  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setAllowFileAccessFromFileURLs):
  • WebProcess/InjectedBundle/InjectedBundle.h:

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

Reviewed by Darin Adler.

WebKitTestRunner needs layoutTestController.setAllowFileAccessFromFileURLs
https://bugs.webkit.org/show_bug.cgi?id=57572

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

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r82847 r82848  
     12011-04-04  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebKitTestRunner needs layoutTestController.setAllowFileAccessFromFileURLs
     6        https://bugs.webkit.org/show_bug.cgi?id=57572
     7
     8        Unskip passed tests.
     9
     10        * platform/mac-wk2/Skipped:
     11
    1122011-04-04  Pavel Feldman  <pfeldman@google.com>
    213
  • trunk/LayoutTests/platform/mac-wk2/Skipped

    r82765 r82848  
    14401440fast/loader/stop-provisional-loads.html
    14411441
    1442 # WebKitTestRunner needs layoutTestController.setAllowFileAccessFromFileURLs
    1443 # <https://bugs.webkit.org/show_bug.cgi?id=57572>
    1444 fast/frames/location-change-no-file-access.html
    1445 fast/xmlhttprequest/xmlhttprequest-no-file-access.html
    1446 
    1447 fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html
    1448 
    14491442# WebKitTestRunner needs layoutTestController.setPrinting
    14501443# <https://bugs.webkit.org/show_bug.cgi?id=42693>
     
    19461939fast/workers/storage/interrupt-database.html
    19471940fast/workers/storage/use-same-database-in-page-and-workers.html
     1941fast/xmlhttprequest/xmlhttprequest-no-file-access.html
     1942fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html
    19481943http/tests/appcache/different-https-origin-resource-main.html
    19491944http/tests/appcache/fallback.html
  • trunk/Source/WebKit2/ChangeLog

    r82839 r82848  
     12011-04-04  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebKitTestRunner needs layoutTestController.setAllowFileAccessFromFileURLs
     6        https://bugs.webkit.org/show_bug.cgi?id=57572
     7
     8        * Shared/WebPreferencesStore.cpp:
     9        (WebKit::WebPreferencesStore::decode):
     10        (WebKit::WebPreferencesStore::overrideAllowFileAccessFromFileURLsForTestRunner):
     11        * Shared/WebPreferencesStore.h:
     12        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     13        (WKBundleSetAllowFileAccessFromFileURLs):
     14        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
     15        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     16        (WebKit::InjectedBundle::setAllowFileAccessFromFileURLs):
     17        * WebProcess/InjectedBundle/InjectedBundle.h:
     18
    1192011-04-04  Brady Eidson  <beidson@apple.com>
    220
  • trunk/Source/WebKit2/Shared/WebPreferencesStore.cpp

    r82356 r82848  
    5252static bool hasAllowUniversalAccessFromFileURLsTestRunnerOverride;
    5353static bool allowUniversalAccessFromFileURLsTestRunnerOverride;
     54static bool hasAllowFileAccessFromFileURLsTestRunnerOverride;
     55static bool allowFileAccessFromFileURLsTestRunnerOverride;
    5456
    5557WebPreferencesStore::WebPreferencesStore()
     
    7375        s.m_boolValues.set(WebPreferencesKey::allowUniversalAccessFromFileURLsKey(), allowUniversalAccessFromFileURLsTestRunnerOverride);
    7476
     77    if (hasAllowFileAccessFromFileURLsTestRunnerOverride)
     78        s.m_boolValues.set(WebPreferencesKey::allowFileAccessFromFileURLsKey(), allowFileAccessFromFileURLsTestRunnerOverride);
     79
    7580    return true;
    7681}
     
    8691    hasAllowUniversalAccessFromFileURLsTestRunnerOverride = true;
    8792    allowUniversalAccessFromFileURLsTestRunnerOverride = enabled;
     93}
     94
     95void WebPreferencesStore::overrideAllowFileAccessFromFileURLsForTestRunner(bool enabled)
     96{
     97    hasAllowFileAccessFromFileURLsTestRunnerOverride = true;
     98    allowFileAccessFromFileURLsTestRunnerOverride = enabled;
    8899}
    89100
  • trunk/Source/WebKit2/Shared/WebPreferencesStore.h

    r82356 r82848  
    170170    static void overrideXSSAuditorEnabledForTestRunner(bool);
    171171    static void overrideAllowUniversalAccessFromFileURLsForTestRunner(bool);
     172    static void overrideAllowFileAccessFromFileURLsForTestRunner(bool);
    172173    static void removeTestRunnerOverrides();
    173174
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r82710 r82848  
    134134}
    135135
     136void WKBundleSetAllowFileAccessFromFileURLs(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
     137{
     138    toImpl(bundleRef)->setAllowFileAccessFromFileURLs(toImpl(pageGroupRef), enabled);
     139}
     140
    136141void WKBundleReportException(JSContextRef context, JSValueRef exception)
    137142{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r82710 r82848  
    6767WK_EXPORT void WKBundleOverrideXSSAuditorEnabledForTestRunner(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
    6868WK_EXPORT void WKBundleOverrideAllowUniversalAccessFromFileURLsForTestRunner(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
     69WK_EXPORT void WKBundleSetAllowFileAccessFromFileURLs(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
    6970WK_EXPORT void WKBundleClearAllDatabases(WKBundleRef bundle);
    7071WK_EXPORT void WKBundleSetDatabaseQuota(WKBundleRef bundle, uint64_t);
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r82710 r82848  
    121121}
    122122
     123void InjectedBundle::setAllowFileAccessFromFileURLs(WebPageGroupProxy* pageGroup, bool enabled)
     124{
     125    // Override the preference for all future pages.
     126    WebPreferencesStore::overrideAllowFileAccessFromFileURLsForTestRunner(enabled);
     127
     128    // Change the setting for existing ones.
     129    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
     130    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
     131        (*iter)->settings()->setAllowFileAccessFromFileURLs(enabled);
     132}
     133
    123134void InjectedBundle::clearAllDatabases()
    124135{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r82776 r82848  
    9292    void overrideXSSAuditorEnabledForTestRunner(WebPageGroupProxy* pageGroup, bool enabled);
    9393    void overrideAllowUniversalAccessFromFileURLsForTestRunner(WebPageGroupProxy*, bool);
     94    void setAllowFileAccessFromFileURLs(WebPageGroupProxy*, bool);
    9495
    9596    // UserContent API
  • trunk/Tools/ChangeLog

    r82844 r82848  
     12011-04-04  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebKitTestRunner needs layoutTestController.setAllowFileAccessFromFileURLs
     6        https://bugs.webkit.org/show_bug.cgi?id=57572
     7
     8        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
     9        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
     10        (WTR::LayoutTestController::setAllowFileAccessFromFileURLs):
     11        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
     12
    1132011-04-04  Keith Kyzivat  <keith.kyzivat@nokia.com>
    214
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl

    r82719 r82848  
    4848        void setXSSAuditorEnabled(in boolean value);
    4949        void setAllowUniversalAccessFromFileURLs(in boolean value);
     50        void setAllowFileAccessFromFileURLs(in boolean value);
    5051
    5152        // Special DOM functions.
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp

    r82727 r82848  
    319319}
    320320
     321void LayoutTestController::setAllowFileAccessFromFileURLs(bool enabled)
     322{
     323    WKBundleSetAllowFileAccessFromFileURLs(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
     324}
     325
    321326unsigned LayoutTestController::windowCount()
    322327{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

    r82719 r82848  
    7676    void setXSSAuditorEnabled(bool);
    7777    void setAllowUniversalAccessFromFileURLs(bool);
     78    void setAllowFileAccessFromFileURLs(bool);
    7879
    7980    // Special DOM functions.
Note: See TracChangeset for help on using the changeset viewer.