Changeset 90367 in webkit


Ignore:
Timestamp:
Jul 4, 2011 8:53:03 AM (13 years ago)
Author:
vsevik@chromium.org
Message:

2011-07-04 Vsevolod Vlasov <vsevik@chromium.org>

Web Inspector: network-preflight-options.html test is flaky.
https://bugs.webkit.org/show_bug.cgi?id=63904

Unreviewed test fix.

  • http/tests/inspector/network-preflight-options-expected.txt:
  • http/tests/inspector/network-preflight-options.html:
  • platform/qt/Skipped:
Location:
trunk/LayoutTests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r90366 r90367  
     12011-07-04  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Web Inspector: network-preflight-options.html test is flaky.
     4        https://bugs.webkit.org/show_bug.cgi?id=63904
     5
     6        Unreviewed test fix.
     7
     8        * http/tests/inspector/network-preflight-options-expected.txt:
     9        * http/tests/inspector/network-preflight-options.html:
     10        * platform/qt/Skipped:
     11
    1122011-07-04  Andras Becsi  <abecsi@webkit.org>
    213
  • trunk/LayoutTests/http/tests/inspector/network-preflight-options-expected.txt

    r90340 r90367  
    55Tests that preflight OPTIONS requests appear in Network resources
    66
     7Bug 63712
    78POST http://localhost:8000/inspector/resources/cors-target.php?deny=yes
    89OPTIONS http://localhost:8000/inspector/resources/cors-target.php?deny=yes
  • trunk/LayoutTests/http/tests/inspector/network-preflight-options.html

    r90340 r90367  
    33<script src="inspector-test.js"></script>
    44<script type="text/javascript">
    5 
    6 function sendXHR(url, forcePreflight, async)
     5function sendXHR(url, forcePreflight, async, callback)
    76{
    87    var xhr = new XMLHttpRequest();
     8
     9    xhr.onreadystatechange = function()
     10    {
     11        if (xhr.readyState === XMLHttpRequest.DONE) {
     12            if (typeof(callback) === "function")
     13                callback();
     14        }
     15    };
     16
    917    xhr.open("POST", url, async);
    1018    xhr.setRequestHeader("Content-Type", forcePreflight ? "application/xml" : "text/plain");
     
    1523}
    1624
     25var targetURL = "http://localhost:8000/inspector/resources/cors-target.php";
    1726function doCrossOriginXHR()
    1827{
    19     var targetURL = "http://localhost:8000/inspector/resources/cors-target.php";
    20 
    2128    // Failed POSTs with no preflight check should result in a POST request being logged
    2229    sendXHR(targetURL + "?deny=yes", false, false);
     
    2936    // And now send the same requests asynchronously
    3037    // Add redundant async parameter to ensure this request differs from the one above.
    31     sendXHR(targetURL + "?deny=yes", false, true);
    32     sendXHR(targetURL + "?deny=yes", true, true);
     38    sendXHR(targetURL + "?deny=yes", false, true, step2);
     39}
     40
     41function step2()
     42{
     43    sendXHR(targetURL + "?deny=yes", true, true, step3);
     44}
     45
     46function step3()
     47{
    3348    sendXHR(targetURL + "?async=yes&date=" + Date.now(), true, true);
    3449}
     
    4055    {
    4156        var resource = event.data;
    42         InspectorTest.addResult(resource.requestMethod + " " +  resource.url.replace(/[&?]date=\d+/, ""));
    43         if (resource.requestMethod === "POST" && ++postRequestsCount == 4)
     57        InspectorTest.addResult(resource.requestMethod + " " + resource.url.replace(/[&?]date=\d+/, ""));
     58        if (resource.requestMethod === "POST" && ++postRequestsCount === 4)
    4459            InspectorTest.completeTest();
    4560    }
     
    4762    InspectorTest.evaluateInPage("doCrossOriginXHR();");
    4863}
    49 
    5064</script>
    5165</head>
    5266<body onload="runTest()">
    5367<p>Tests that preflight OPTIONS requests appear in Network resources</p>
     68<a href="https://bugs.webkit.org/show_bug.cgi?id=63712">Bug 63712</a>
    5469</body>
    5570</html>
  • trunk/LayoutTests/platform/qt/Skipped

    r90366 r90367  
    482482
    483483transitions/change-values-during-transition.html
    484 
    485 # [Qt] http/tests/inspector/network-preflight-options.html fails frequently
    486 # https://bugs.webkit.org/show_bug.cgi?id=63910
    487 http/tests/inspector/network-preflight-options.html
    488484
    489485# http/tests/inspector/resource-har-conversion.html is failing on the release bot after r63191
Note: See TracChangeset for help on using the changeset viewer.