Changeset 252210 in webkit


Ignore:
Timestamp:
Nov 7, 2019 3:16:39 PM (4 years ago)
Author:
Kate Cheney
Message:

Many resourceLoadStatistics tests and storageAccess tests using the ITP
Database redirect to the corresponding memory store test after setting
a cookie
https://bugs.webkit.org/show_bug.cgi?id=203958
<rdar://problem/56984114>

Reviewed by John Wilander.

This patch fixes incorrect redirects in some ITP database store tests.
They should redirect back to themselves as opposed to corresponding
memory store tests to be sure they are testing the correct
functionality.

  • http/tests/resourceLoadStatistics/add-blocking-to-redirect-database.html:
  • http/tests/resourceLoadStatistics/blocking-in-web-worker-script-import-database.html:
  • http/tests/resourceLoadStatistics/cookie-deletion-database.html:
  • http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html:
  • http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-database.html:
  • http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-database.html:
  • http/tests/resourceLoadStatistics/grandfathering-database.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-database.html:
  • http/tests/resourceLoadStatistics/ping-to-prevalent-resource-database.html:
  • http/tests/storageAccess/deny-due-to-no-interaction-under-general-third-party-cookie-blocking-database.html:
  • http/tests/storageAccess/grant-with-prompt-under-general-third-party-cookie-blocking-database.html:
  • http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-database.html:
  • http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-ephemeral-database.html:
  • http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie-database.html:
  • http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access-database.html:
  • http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access-database.html:
  • http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access-database.html:
Location:
trunk/LayoutTests
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r252205 r252210  
     12019-11-07  Kate Cheney  <katherine_cheney@apple.com>
     2
     3       Many resourceLoadStatistics tests and storageAccess tests using the ITP
     4       Database redirect to the corresponding memory store test after setting
     5       a cookie
     6       https://bugs.webkit.org/show_bug.cgi?id=203958
     7       <rdar://problem/56984114>
     8
     9        Reviewed by John Wilander.
     10
     11        This patch fixes incorrect redirects in some ITP database store tests.
     12        They should redirect back to themselves as opposed to corresponding
     13        memory store tests to be sure they are testing the correct
     14        functionality.
     15
     16        * http/tests/resourceLoadStatistics/add-blocking-to-redirect-database.html:
     17        * http/tests/resourceLoadStatistics/blocking-in-web-worker-script-import-database.html:
     18        * http/tests/resourceLoadStatistics/cookie-deletion-database.html:
     19        * http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html:
     20        * http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-database.html:
     21        * http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-database.html:
     22        * http/tests/resourceLoadStatistics/grandfathering-database.html:
     23        * http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-database.html:
     24        * http/tests/resourceLoadStatistics/ping-to-prevalent-resource-database.html:
     25        * http/tests/storageAccess/deny-due-to-no-interaction-under-general-third-party-cookie-blocking-database.html:
     26        * http/tests/storageAccess/grant-with-prompt-under-general-third-party-cookie-blocking-database.html:
     27        * http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-database.html:
     28        * http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-ephemeral-database.html:
     29        * http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie-database.html:
     30        * http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access-database.html:
     31        * http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access-database.html:
     32        * http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access-database.html:
     33
    1342019-11-06  Ryosuke Niwa  <rniwa@webkit.org>
    235
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/add-blocking-to-redirect-database.html

    r250393 r252210  
    1919    const partitionedCookieName = "partitionedCookie";
    2020    const subPathToSetPartitionedCookie = "/set-cookie.php?name=" + partitionedCookieName + "&value=value";
    21     const returnUrl = "http://" + partitionHost + "/resourceLoadStatistics/add-blocking-to-redirect.html";
     21    const returnUrl = "http://" + partitionHost + "/resourceLoadStatistics/add-blocking-to-redirect-database.html";
    2222    const subPathToGetCookies = "/get-cookies.php?name1=" + firstPartyCookieName + "&name2=" + partitionedCookieName;
    2323    const redirectChainUrl = "http://" + partitionHost + resourcePath + "/redirect.php?redirectTo=" + thirdPartyBaseUrl + subPathToGetCookies;
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/blocking-in-web-worker-script-import-database.html

    r250393 r252210  
    1515    const firstPartyCookieName = "firstPartyCookie";
    1616    const subPathToSetFirstPartyCookie = "/set-cookie.php?name=" + firstPartyCookieName + "&value=value";
    17     const returnUrl = "http://127.0.0.1:8000/resourceLoadStatistics/blocking-in-web-worker-script-import.html";
     17    const returnUrl = "http://127.0.0.1:8000/resourceLoadStatistics/blocking-in-web-worker-script-import-database.html";
    1818    const subPathToGetCookies = "/get-cookies.php?name1=" + firstPartyCookieName;
    1919
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/cookie-deletion-database.html

    r250393 r252210  
    1818    const thirdPartyCookieName = "thirdPartyCookie";
    1919    const subPathToSetThirdPartyCookie = "/set-cookie.php?name=" + thirdPartyCookieName + "&value=value";
    20     const fragmentWithReturnUrl = "http://" + partitionHost + "/resourceLoadStatistics/cookie-deletion.html";
     20    const fragmentWithReturnUrl = "http://" + partitionHost + "/resourceLoadStatistics/cookie-deletion-database.html";
    2121    const subPathToGetCookies = "/get-cookies.php?name1=" + firstPartyCookieName + "&name2=" + thirdPartyCookieName;
    2222
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html

    r250393 r252210  
    1414    const firstPartyCookieName = "firstPartyCookie";
    1515    const subPathToSetFirstPartyCookie = "/set-cookie.php?name=" + firstPartyCookieName + "&value=value";
    16     const fragmentWithReturnUrl = "http://127.0.0.1:8000/resourceLoadStatistics/cookies-with-and-without-user-interaction.html";
     16    const fragmentWithReturnUrl = "http://127.0.0.1:8000/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html";
    1717    const subPathToGetCookies = "/get-cookies.php?name1=" + firstPartyCookieName;
    1818
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-database.html

    r250393 r252210  
    2828                    if (testRunner.isStatisticsPrevalentResource("http://localhost:8000"))
    2929                        testFailed("Localhost was classified as prevalent resource before the test starts.");
    30                     document.location.href = "http://localhost:8000/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html";
     30                    document.location.href = "http://localhost:8000/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-database.html";
    3131                });
    3232                break;
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-database.html

    r250393 r252210  
    2525
    2626    function navigateSameOriginToAddQuery() {
    27         document.location.href = prevalentResourceOrigin + "/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource.html?link=query";
     27        document.location.href = prevalentResourceOrigin + "/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-database.html?link=query";
    2828    }
    2929
    3030    function navigateCrossOrigin() {
    31         document.location.href = destinationOrigin + "/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource.html";
     31        document.location.href = destinationOrigin + "/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-database.html";
    3232    }
    3333
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/grandfathering-database.html

    r250393 r252210  
    1515    const cookieValue = "value";
    1616    const subPathToSetFirstPartyCookie = "/set-cookie.php?name=" + firstPartyCookieName + "&value=" + cookieValue;
    17     const returnUrl = firstPartyOrigin + "/resourceLoadStatistics/grandfathering.html";
     17    const returnUrl = firstPartyOrigin + "/resourceLoadStatistics/grandfathering-database.html";
    1818    const thirdPartyOrigin = "http://127.0.0.1:8000";
    1919    const thirdPartyBaseUrl = thirdPartyOrigin + "/resourceLoadStatistics/resources";
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-database.html

    r250393 r252210  
    1414    const firstPartyCookieName = "firstPartyCookie";
    1515    const subPathToSetFirstPartyCookie = "/set-cookie.php?name=" + firstPartyCookieName + "&value=value";
    16     const fragmentWithReturnUrl = "http://127.0.0.1:8000/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html";
     16    const fragmentWithReturnUrl = "http://127.0.0.1:8000/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-database.html";
    1717    const subPathToGetCookies = "/get-cookies.php?name1=" + firstPartyCookieName;
    1818
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/ping-to-prevalent-resource-database.html

    r250393 r252210  
    1919    const firstPartyCookieName = "firstPartyCookie";
    2020    const subPathToSetFirstPartyCookie = "/set-cookie.php?name=" + firstPartyCookieName + "&value=value";
    21     const returnUrl = "http://" + partitionHost + "/resourceLoadStatistics/ping-to-prevalent-resource.html";
     21    const returnUrl = "http://" + partitionHost + "/resourceLoadStatistics/ping-to-prevalent-resource-database.html";
    2222    const subPathToGetCookies = "/get-cookies.php?name1=" + firstPartyCookieName;
    2323
  • trunk/LayoutTests/http/tests/storageAccess/deny-due-to-no-interaction-under-general-third-party-cookie-blocking-database.html

    r251663 r252210  
    5555            if (document.location.hash !== "#cookieSet") {
    5656                setEnableFeature(true, function() {
    57                     document.location.href = thirdPartyUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#" + firstPartyUrl + "/storageAccess/deny-due-to-no-interaction-under-general-third-party-cookie-blocking.html#cookieSet";
     57                    document.location.href = thirdPartyUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#" + firstPartyUrl + "/storageAccess/deny-due-to-no-interaction-under-general-third-party-cookie-blocking-database.html#cookieSet";
    5858                });
    5959            } else {
  • trunk/LayoutTests/http/tests/storageAccess/grant-with-prompt-under-general-third-party-cookie-blocking-database.html

    r251663 r252210  
    5555            if (document.location.hash !== "#cookieSet") {
    5656                setEnableFeature(true, function() {
    57                     document.location.href = thirdPartyUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#" + firstPartyUrl + "/storageAccess/grant-with-prompt-under-general-third-party-cookie-blocking.html#cookieSet";
     57                    document.location.href = thirdPartyUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#" + firstPartyUrl + "/storageAccess/grant-with-prompt-under-general-third-party-cookie-blocking-database.html#cookieSet";
    5858                });
    5959            } else {
  • trunk/LayoutTests/http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-database.html

    r251016 r252210  
    2828                setEnableFeature(false, function() {
    2929                    testRunner.setUseITPDatabase(true);
    30                     document.location.href = statisticsUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#http://127.0.0.1:8000/storageAccess/has-storage-access-true-if-third-party-has-cookies.html#firstPartyCookieSet";
     30                    document.location.href = statisticsUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#http://127.0.0.1:8000/storageAccess/has-storage-access-true-if-third-party-has-cookies-database.html#firstPartyCookieSet";
    3131                });
    3232            } else {
  • trunk/LayoutTests/http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-ephemeral-database.html

    r251016 r252210  
    2727            testRunner.setUseITPDatabase(true);
    2828            if (document.location.hash !== "#firstPartyCookieSet") {
    29                 document.location.href = statisticsUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#http://127.0.0.1:8000/storageAccess/has-storage-access-true-if-third-party-has-cookies.html#firstPartyCookieSet";
     29                document.location.href = statisticsUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#http://127.0.0.1:8000/storageAccess/has-storage-access-true-if-third-party-has-cookies-database.html#firstPartyCookieSet";
    3030            } else {
    3131                let iframeElement = document.createElement("iframe");
  • trunk/LayoutTests/http/tests/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie-database.html

    r251663 r252210  
    4343
    4444                        // Set a cookie for the third-party and continue.
    45                         document.location.href = thirdPartyUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#" + firstPartyUrl + "/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie.html#step1";
     45                        document.location.href = thirdPartyUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#" + firstPartyUrl + "/storageAccess/has-storage-access-under-general-third-party-cookie-blocking-with-cookie-database.html#step1";
    4646                    });
    4747                    break;
  • trunk/LayoutTests/http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access-database.html

    r251016 r252210  
    9292        if (document.location.hash !== "#firstPartyCookieSet" && document.location.hash !== "#elementActivated") {
    9393            setEnableFeature(true, function() {
    94                 document.location.href = statisticsUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#http://127.0.0.1:8000/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html#firstPartyCookieSet";
     94                document.location.href = statisticsUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#http://127.0.0.1:8000/storageAccess/request-and-grant-access-then-detach-should-not-have-access-database.html#firstPartyCookieSet";
    9595            });
    9696        } else {
  • trunk/LayoutTests/http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access-database.html

    r251016 r252210  
    6565        if (document.location.hash !== "#firstPartyCookieSet") {
    6666            setEnableFeature(true, function() {
    67                 document.location.href = statisticsUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#http://127.0.0.1:8000/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access.html#firstPartyCookieSet";
     67                document.location.href = statisticsUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#http://127.0.0.1:8000/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access-database.html#firstPartyCookieSet";
    6868            });
    6969        } else {
  • trunk/LayoutTests/http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access-database.html

    r251016 r252210  
    6565        if (document.location.hash !== "#firstPartyCookieSet") {
    6666            setEnableFeature(true, function() {
    67                 document.location.href = statisticsUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#http://127.0.0.1:8000/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access.html#firstPartyCookieSet";
     67                document.location.href = statisticsUrl + "/storageAccess/resources/set-cookie.php?name=firstPartyCookie&value=value#http://127.0.0.1:8000/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access-database.html#firstPartyCookieSet";
    6868            });
    6969        } else {
Note: See TracChangeset for help on using the changeset viewer.