Changeset 85314 in webkit


Ignore:
Timestamp:
Apr 29, 2011 3:23:06 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

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

Reviewed by Pavel Feldman.

Chromium DevTools: Fix network panel timing/size/headers tests.
https://bugs.webkit.org/show_bug.cgi?id=59696

  • src/js/Tests.js: (.TestSuite.prototype.testNetworkSize.finishResource): (.TestSuite.prototype.testNetworkSyncSize.finishResource): (.TestSuite.prototype.testNetworkRawHeadersText.finishResource): (.TestSuite.prototype.testNetworkTiming.finishResource):
Location:
trunk/Source/WebKit/chromium
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r85312 r85314  
     12011-04-29  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Chromium DevTools: Fix network panel timing/size/headers tests.
     6        https://bugs.webkit.org/show_bug.cgi?id=59696
     7
     8        * src/js/Tests.js:
     9        (.TestSuite.prototype.testNetworkSize.finishResource):
     10        (.TestSuite.prototype.testNetworkSyncSize.finishResource):
     11        (.TestSuite.prototype.testNetworkRawHeadersText.finishResource):
     12        (.TestSuite.prototype.testNetworkTiming.finishResource):
     13
    1142011-04-29  Pavel Feldman  <pfeldman@google.com>
    215
  • trunk/Source/WebKit/chromium/src/js/Tests.js

    r84258 r85314  
    530530    function finishResource(resource, finishTime)
    531531    {
    532         test.assertEquals(221, resource.transferSize, "Incorrect total encoded data length");
     532        test.assertEquals(219, resource.transferSize, "Incorrect total encoded data length");
    533533        test.assertEquals(25, resource.resourceSize, "Incorrect total data length");
    534534        test.releaseControl();
     
    553553    function finishResource(resource, finishTime)
    554554    {
    555         test.assertEquals(221, resource.transferSize, "Incorrect total encoded data length");
     555        test.assertEquals(219, resource.transferSize, "Incorrect total encoded data length");
    556556        test.assertEquals(25, resource.resourceSize, "Incorrect total data length");
    557557        test.releaseControl();
     
    560560    this.addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishResource", finishResource);
    561561
    562     // Send synchronous XHR  to sniff network events
     562    // Send synchronous XHR to sniff network events
    563563    test.evaluateInConsole_("var xhr = new XMLHttpRequest(); xhr.open(\"GET\", \"chunked\", false); xhr.send(null);", function() {});
    564564   
     
    576576    function finishResource(resource, finishTime)
    577577    {
    578         var rawResponseHeadersText = resource.rawResponseHeadersText
    579         if (!rawResponseHeadersText)
    580             test.fail("Failure: resource does not have raw response header text");
    581         test.assertEquals(166, resource.rawResponseHeadersText.length, "Incorrect raw response header text length");
     578        if (!resource.responseHeadersText)
     579            test.fail("Failure: resource does not have response headers text");
     580        test.assertEquals(164, resource.responseHeadersText.length, "Incorrect response headers text length");
    582581        test.releaseControl();
    583582    }
     
    601600    function finishResource(resource, finishTime)
    602601    {
    603         test.assertTrue(resource.timing.receiveHeadersEnd - resource.timing.connectStart >= 100,
    604                         "Time between receiveHeadersEnd and connectStart should be >=100ms, but was " +
     602        // Setting relaxed expectations to reduce flakiness.
     603        // Server sends headers after 100ms, then sends data during another 100ms.
     604        // We expect these times to be measured at least as 70ms. 
     605        test.assertTrue(resource.timing.receiveHeadersEnd - resource.timing.connectStart >= 70,
     606                        "Time between receiveHeadersEnd and connectStart should be >=70ms, but was " +
    605607                        "receiveHeadersEnd=" + resource.timing.receiveHeadersEnd + ", connectStart=" + resource.timing.connectStart + ".");
    606         test.assertTrue(resource.endTime - resource.startTime >= 0.2,
    607                         "Time between endTime and startTime should be >=200ms, but was " +
    608                         "endtime=" + resource.endTime + ", startTime=" + resource.startTime + ".");
     608        test.assertTrue(resource.responseReceivedTime - resource.startTime >= 0.07,
     609                "Time between responseReceivedTime and startTime should be >=0.07s, but was " +
     610                "responseReceivedTime=" + resource.responseReceivedTime + ", startTime=" + resource.startTime + ".");
     611        test.assertTrue(resource.endTime - resource.startTime >= 0.14,
     612                "Time between endTime and startTime should be >=0.14s, but was " +
     613                "endtime=" + resource.endTime + ", startTime=" + resource.startTime + ".");
    609614       
    610615        test.releaseControl();
Note: See TracChangeset for help on using the changeset viewer.