Changeset 261620 in webkit


Ignore:
Timestamp:
May 13, 2020 10:03:33 AM (4 years ago)
Author:
Kate Cheney
Message:

Add test for non-app-bound iframe under app-bound domain
https://bugs.webkit.org/show_bug.cgi?id=211815
<rdar://problem/63159707>

Reviewed by Brent Fulgham.

Tools:

Clear the main frame app-bound session before loading the iframe so
we can be sure the iframe uses an app-bound session.

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

(WTR::TestRunner::clearAppBoundSession):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/in-app-browser-privacy/non-app-bound-iframe-under-app-bound-domain-is-app-bound-expected.txt: Added.
  • http/tests/in-app-browser-privacy/non-app-bound-iframe-under-app-bound-domain-is-app-bound.html: Added.
  • http/tests/in-app-browser-privacy/resources/non-app-bound-iframe.html: Added.
Location:
trunk
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r261619 r261620  
     12020-05-13  Kate Cheney  <katherine_cheney@apple.com>
     2
     3        Add test for non-app-bound iframe under app-bound domain
     4        https://bugs.webkit.org/show_bug.cgi?id=211815
     5        <rdar://problem/63159707>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        * http/tests/in-app-browser-privacy/non-app-bound-iframe-under-app-bound-domain-is-app-bound-expected.txt: Added.
     10        * http/tests/in-app-browser-privacy/non-app-bound-iframe-under-app-bound-domain-is-app-bound.html: Added.
     11        * http/tests/in-app-browser-privacy/resources/non-app-bound-iframe.html: Added.
     12
    1132020-05-13  Simon Fraser  <simon.fraser@apple.com>
    214
  • trunk/Tools/ChangeLog

    r261611 r261620  
     12020-05-13  Kate Cheney  <katherine_cheney@apple.com>
     2
     3        Add test for non-app-bound iframe under app-bound domain
     4        https://bugs.webkit.org/show_bug.cgi?id=211815
     5        <rdar://problem/63159707>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Clear the main frame app-bound session before loading the iframe so
     10        we can be sure the iframe uses an app-bound session.
     11
     12        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
     13        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
     14        (WTR::TestRunner::clearAppBoundSession):
     15        * WebKitTestRunner/InjectedBundle/TestRunner.h:
     16        * WebKitTestRunner/TestInvocation.cpp:
     17        (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
     18
    1192020-05-13  Philippe Normand  <pnormand@igalia.com>
    220
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl

    r261242 r261620  
    396396
    397397    boolean hasAppBoundSession();
     398    void clearAppBoundSession();
    398399    void setAppBoundDomains(object originsArray, object callback);
    399400
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

    r261242 r261620  
    29772977}
    29782978
     2979void TestRunner::clearAppBoundSession()
     2980{
     2981    auto messageName = adoptWK(WKStringCreateWithUTF8CString("ClearAppBoundSession"));
     2982    WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), messageName.get(), nullptr, nullptr);
     2983}
     2984
    29792985void TestRunner::setAppBoundDomains(JSValueRef originArray, JSValueRef completionHandler)
    29802986{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

    r261242 r261620  
    503503
    504504    bool hasAppBoundSession();
     505    void clearAppBoundSession();
    505506    void setAppBoundDomains(JSValueRef originArray, JSValueRef callback);
    506507    void didSetAppBoundDomainsCallback();
  • trunk/Tools/WebKitTestRunner/TestInvocation.cpp

    r261242 r261620  
    18021802        return nullptr;
    18031803    }
     1804   
     1805    if (WKStringIsEqualToUTF8CString(messageName, "ClearAppBoundSession")) {
     1806        TestController::singleton().clearAppBoundSession();
     1807        return nullptr;
     1808    }
    18041809
    18051810    if (WKStringIsEqualToUTF8CString(messageName, "SetAdClickAttributionOverrideTimerForTesting")) {
Note: See TracChangeset for help on using the changeset viewer.