Changeset 230691 in webkit


Ignore:
Timestamp:
Apr 16, 2018 4:57:08 PM (6 years ago)
Author:
Keith Rollin
Message:

REGRESSION: [mac-wk2 release] LayoutTest http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=184673
<rdar://problem/39474698>

Unreviewed test gardening. The test was flaky because the HTTP parser
would try to preload the Javascript resource. Sometimes this operation
would complete in time to print its own console message, duplicating a
subsequent one when the non-preloading resource-load occurs. Updated
the test to load the Javascript in such a way that it skips the reload
step.

  • TestExpectations:
  • http/tests/security/contentSecurityPolicy/script-src-blocked-error-event-expected.txt:
  • http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html:
Location:
trunk/LayoutTests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r230688 r230691  
     12018-04-16  Keith Rollin  <krollin@apple.com>
     2
     3        REGRESSION: [mac-wk2 release] LayoutTest http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html is flaky
     4        https://bugs.webkit.org/show_bug.cgi?id=184673
     5        <rdar://problem/39474698>
     6
     7        Unreviewed test gardening. The test was flaky because the HTTP parser
     8        would try to preload the Javascript resource. Sometimes this operation
     9        would complete in time to print its own console message, duplicating a
     10        subsequent one when the non-preloading resource-load occurs. Updated
     11        the test to load the Javascript in such a way that it skips the reload
     12        step.
     13
     14        * TestExpectations:
     15        * http/tests/security/contentSecurityPolicy/script-src-blocked-error-event-expected.txt:
     16        * http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html:
     17
    1182018-04-16  Ross Kirsling  <ross.kirsling@sony.com>
    219
  • trunk/LayoutTests/TestExpectations

    r230632 r230691  
    11971197webkit.org/b/154522 http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-base-uri-deny.html
    11981198webkit.org/b/155132 http/tests/security/contentSecurityPolicy/video-with-https-url-allowed-by-csp-media-src-star.html [ Failure ]
    1199 http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html [ Pass Failure ]
    12001199webkit.org/b/158480 http/tests/websocket/tests/hybi/upgrade-simple-ws.html [ Skip ]
    12011200
  • trunk/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-blocked-error-event-expected.txt

    r195367 r230691  
    1 CONSOLE MESSAGE: Refused to load the script 'http://localhost:8000/security/contentSecurityPolicy/resources/script-set-value.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline'".
    2 
     1CONSOLE MESSAGE: Refused to load http://localhost:8000/security/contentSecurityPolicy/resources/script-set-value.js because it does not appear in the script-src directive of the Content Security Policy.
    32
    43PASS Script element has error on bad script-src
  • trunk/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html

    r195367 r230691  
    1919</head>
    2020    <body>
    21     <script onload="scriptLoad();" onerror="scriptError();" src="http://localhost:8000/security/contentSecurityPolicy/resources/script-set-value.js"></script>
     21    <script>
     22        let script = document.createElement("script");
     23        script.src = "http://localhost:8000/security/contentSecurityPolicy/resources/script-set-value.js";
     24        script.onerror = scriptError;
     25        script.onload = scriptLoad;
     26        document.body.appendChild(script);
     27    </script>
    2228    </body>
    2329</html>
Note: See TracChangeset for help on using the changeset viewer.