Changeset 249833 in webkit


Ignore:
Timestamp:
Sep 13, 2019, 7:42:14 AM (6 years ago)
Author:
Chris Dumez
Message:

Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in http/tests/security/appcache-in-private-browsing.html
https://bugs.webkit.org/show_bug.cgi?id=201704

Reviewed by Youenn Fablet.

Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in http/tests/security/appcache-in-private-browsing.html
and use the new useEphemeralSession WKTR / DRT flag instead.

  • http/tests/security/appcache-in-private-browsing-expected.txt:
  • http/tests/security/appcache-in-private-browsing.html:
  • http/tests/security/resources/frame-for-appcache-in-private-browsing.html:
  • platform/mac-wk2/TestExpectations:
Location:
trunk/LayoutTests
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r249831 r249833  
     12019-09-13  Chris Dumez  <cdumez@apple.com>
     2
     3        Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in http/tests/security/appcache-in-private-browsing.html
     4        https://bugs.webkit.org/show_bug.cgi?id=201704
     5
     6        Reviewed by Youenn Fablet.
     7
     8        Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in http/tests/security/appcache-in-private-browsing.html
     9        and use the new useEphemeralSession WKTR / DRT flag instead.
     10
     11        * http/tests/security/appcache-in-private-browsing-expected.txt:
     12        * http/tests/security/appcache-in-private-browsing.html:
     13        * http/tests/security/resources/frame-for-appcache-in-private-browsing.html:
     14        * platform/mac-wk2/TestExpectations:
     15
    1162019-09-13  Joseph Pecoraro  <pecoraro@apple.com>
    217
  • trunk/LayoutTests/http/tests/security/appcache-in-private-browsing-expected.txt

    r231450 r249833  
    1 CONSOLE MESSAGE: line 1: ApplicationCache is deprecated. Please use ServiceWorkers instead.
    2 CONSOLE MESSAGE: line 31: Application cache not loaded
    31This test passes if the application cache does not load while in private browsing
    42
     
    86Frame: '<!--frame1-->'
    97--------
     8Application cache not loaded
    109
  • trunk/LayoutTests/http/tests/security/appcache-in-private-browsing.html

    r249542 r249833  
     1<!-- webkit-test-runner [ useEphemeralSession=true ] -->
    12<html>
    23<head>
     
    89}
    910
    10 function finishTest(frame) {
     11function finishTest() {
    1112        if (window.testRunner)
    1213                testRunner.notifyDone();
    13 }
    14 
    15 function enterPrivateBrowsing(frame) {
    16         if (window.testRunner)
    17                 testRunner.setPrivateBrowsingEnabled_DEPRECATED(true);
    18         frame.onload = finishTest;
    19         frame.contentWindow.location.reload();
    2014}
    2115</script>
     
    2317<body>
    2418<p>This test passes if the application cache does not load while in private browsing</p>
    25 <iframe src="resources/frame-for-appcache-in-private-browsing.html" onload="enterPrivateBrowsing(this)"></iframe>
     19<iframe src="resources/frame-for-appcache-in-private-browsing.html" onload="finishTest()"></iframe>
    2620</body>
    2721</html>
  • trunk/LayoutTests/http/tests/security/appcache-switching-private-browsing-expected.txt

    r231450 r249833  
    99Frame: '<!--frame1-->'
    1010--------
     11Application cache loaded
     12Application cache not loaded
    1113
  • trunk/LayoutTests/http/tests/security/resources/frame-for-appcache-in-private-browsing.html

    r163823 r249833  
    22<head>
    33<script>
     4function log(msg)
     5{
     6    let c = document.getElementById("console");
     7    c.innerHTML = c.innerHTML + msg + "<br>";
     8}
     9
    410function updateAppCache(callback) {
    511        appCacheCallback = callback;
     
    814
    915window.applicationCache.onnoupdate = function(e) {
    10         console.log("Application cache loaded");
     16        log("Application cache loaded");
    1117        if (window.appCacheCallback) {
    1218                appCacheCallback(true);
     
    1521
    1622window.applicationCache.oncached = function(e) {
    17         console.log("Application cache loaded");
     23        log("Application cache loaded");
    1824        if (window.appCacheCallback) {
    1925                appCacheCallback(true);
     
    2228
    2329window.applicationCache.onupdateready = function(e) {
    24         console.log("Application cache loaded");
     30        log("Application cache loaded");
    2531        if (window.appCacheCallback) {
    2632                appCacheCallback(true);
     
    2935
    3036window.applicationCache.onerror = function(e) {
    31         console.log("Application cache not loaded");
     37        log("Application cache not loaded");
    3238        if (window.appCacheCallback) {
    3339                appCacheCallback(false);
     
    3743</head>
    3844<body>
     45<div id="console"></div>
    3946<img src="abe.png">
    4047</body>
  • trunk/LayoutTests/platform/wk2/TestExpectations

    r249817 r249833  
    9191# https://bugs.webkit.org/show_bug.cgi?id=115274
    9292# testRunner.setPrivateBrowsingEnabled_DEPRECATED() doesn't work with NetworkProcess and is WebKitLegacy only.
    93 http/tests/security/appcache-in-private-browsing.html [ Skip ]
    9493http/tests/security/appcache-switching-private-browsing.html [ Skip ]
    9594http/tests/security/cookies/first-party-cookie-allow-xslt.xml [ Skip ]
Note: See TracChangeset for help on using the changeset viewer.