[Webkit-unassigned] [Bug 157133] Move ResourceTiming behind a runtime flag

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 2 00:24:25 PDT 2016


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

--- Comment #28 from Yoav Weiss <yoav at yoav.ws> ---
(In reply to comment #27)
> Comment on attachment 277852 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=277852&action=review
> 
> > LayoutTests/http/tests/performance/performance-resource-timing-entries.html:8
> > +    var url = "../../resources/square100.png?";
> > +    url += Math.random();
> > +    document.write("<img src='" + url + "'>");
> 
> This definitely will force reloading.  There are better ways of doing this,
> and we should handle caching better, but this is fine to go in if you file a
> bug to fix that.

Will do.

> 
> > LayoutTests/http/tests/performance/performance-resource-timing-entries.html:17
> > +        var resources = performance.getEntriesByType('resource');
> > +        for (var i = 0; i < resources.length; ++i) {
> > +            if (resources[i].name.indexOf("square100") != -1) {
> 
> Last time we just made sure that resources.length was 2.  Now we iterate it
> and make sure square100.png?randomnumber is in it. Was the length 2 before
> because the main resource and the image were expected to be in it?

The length was 2 because the of the test framework JS files. 
I changed the test to look for a specific resource as I didn't want to cache-bust the JS framework, and checking only length now would be flaky, as the JS would be cached, while the image will not be (so length would be 2 on the first run, and 1 in following runs).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160502/64662513/attachment.html>


More information about the webkit-unassigned mailing list