<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Move ResourceTiming behind a runtime flag"
href="https://bugs.webkit.org/show_bug.cgi?id=157133#c28">Comment # 28</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Move ResourceTiming behind a runtime flag"
href="https://bugs.webkit.org/show_bug.cgi?id=157133">bug 157133</a>
from <span class="vcard"><a class="email" href="mailto:yoav@yoav.ws" title="Yoav Weiss <yoav@yoav.ws>"> <span class="fn">Yoav Weiss</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=157133#c27">comment #27</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=277852&action=diff" name="attach_277852" title="Patch">attachment 277852</a> <a href="attachment.cgi?id=277852&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=277852&action=review">https://bugs.webkit.org/attachment.cgi?id=277852&action=review</a>
>
> > 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.</span >
Will do.
<span class="quote">>
> > 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?</span >
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).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>