[Webkit-unassigned] [Bug 55306] Web Inspector: add first network test, improve harness.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Feb 27 23:57:58 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=55306


Yury Semikhatsky <yurys at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #84021|review?                     |review-
               Flag|                            |




--- Comment #2 from Yury Semikhatsky <yurys at chromium.org>  2011-02-27 23:57:58 PST ---
(From update of attachment 84021)
View in context: https://bugs.webkit.org/attachment.cgi?id=84021&action=review

> LayoutTests/http/tests/inspector/inspector-test.js:308
>      layoutTestController.closeWebInspector();

Please delete watchdog timer here to make sure we don't close inspector twice.

> LayoutTests/http/tests/inspector/network/network-size.html:33
> +        var resource1 = WebInspector.panels.network.resources[0];

Image order might change. Can you sort the results to avoid inconsistent output? r- for this.

> LayoutTests/http/tests/inspector/network/network-timing.html:34
> +        InspectorTest.addResult(resource1.url);

Results' order should not depend on network activity.

> LayoutTests/http/tests/inspector/network/network-timing.html:36
> +        InspectorTest.assertGreaterOrEqual(300, resource1.duration * 1000, "Duration of the first resource");

I don't like that we deliberately slow down layout tests. Can we use mocks/something else to avoid this. Inspector tests are already notorious for being quite slow.

> LayoutTests/http/tests/inspector/network/network-timing.html:41
> +        InspectorTest.assertGreaterOrEqual(100, resource2.latency * 1000, "Latency of the second resource");

I think we should print something in case of success.

> LayoutTests/http/tests/inspector/network/resources/resource.php:42
> +    var now = new Date();

Just use Date.now(). This way you won't need Number(now) cast below.

> LayoutTests/http/tests/inspector/network/resources/resource.php:55
> +            echo("function foo() {}");

Could be rewritten as
if (!$jscontent)
    $jscontent = "function foo() {}";
and use same logic for both branches.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list