<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[178721] trunk/LayoutTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/178721">178721</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2015-01-20 10:26:00 -0800 (Tue, 20 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>fast/hidpi/image-srcset-change-dynamically-from-js-2x.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=140649

fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html is failing on some bots
https://bugs.webkit.org/show_bug.cgi?id=134769

Reviewed by Darin Adler.

Streamline resources/srcset-helper.js and remove races.

* TestExpectations: Unskip fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html.

* fast/hidpi/resources/srcset-helper.js: Deleted. We aleady had a copy in /resources,
no need for two copies.

* resources/srcset-helper.js: This script used to depend on setBackingScaleFactor
invoke its callback really fast, which is not guaranteed. Also, it had broken logic
that used non-existent window.deviceScaleFactor.

* fast/dom/HTMLImageElement/sizes/image-sizes-2x.html:
* fast/dom/HTMLImageElement/sizes/image-sizes-js-change-expected.txt:
* fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html:
* fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml-expected.txt:
* fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml.html:
Updated to run the tests from runTest() function, not a load event handler.
Where appropriate, changed from testRunner.dumpResourceLoadCallbacks() to
testRunner.dumpResourceResponseMIMETypes(), because the latter doesn't unnecessarily
include reloaded scripts. It feels somewhat hacky, but the hack is already used in
fast/hidpi, and it improves output.

* fast/hidpi/image-srcset-change-dynamically-from-js-1x.html:
* fast/hidpi/image-srcset-change-dynamically-from-js-2x.html:
* fast/hidpi/image-srcset-fraction-1.5x.html:
* fast/hidpi/image-srcset-fraction.html:
* fast/hidpi/image-srcset-intrinsic-size.html:
* fast/hidpi/image-srcset-invalid-descriptor.html:
* fast/hidpi/image-srcset-invalid-inputs-except-one.html:
* fast/hidpi/image-srcset-nomodifier.html:
* fast/hidpi/image-srcset-only-src-attribute.html:
* fast/hidpi/image-srcset-remove-dynamically-from-js.html:
* fast/hidpi/image-srcset-same-alternative-for-both-attributes.html:
* fast/hidpi/image-srcset-simple-1x.html:
* fast/hidpi/image-srcset-simple-2x.html:
* fast/hidpi/image-srcset-space-left-nomodifier.html:
* fast/hidpi/image-srcset-space-prefix-nomodifier.html:
* fast/hidpi/image-srcset-space-suffix-nomodifier.html:
* fast/hidpi/image-srcset-space-surrounded-nomodifier.html:
* fast/hidpi/image-srcset-src-selection-1x-both.html:
* fast/hidpi/image-srcset-src-selection-1x.html:
* fast/hidpi/image-srcset-src-selection-2x.html:
* fast/hidpi/image-srcset-viewport-modifiers.html:
Updated to run the tests from runTest() function, not a load event handler.

* http/tests/loading/sizes/preload-image-sizes-2x-expected.txt: Updated results
for srcset-helper.js now always starting the redirect after the load is fully finished.

* svg/css/svg-resource-fragment-identifier-img-src.html: Updated for the unified
location of the script.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLImageElementsizesimagesizes2xhtml">trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-2x.html</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLImageElementsizesimagesizesjschangeexpectedtxt">trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-change-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLImageElementsizesimagesizesjschangehtml">trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLImageElementsizesimagesizesjsinnerhtmlexpectedtxt">trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLImageElementsizesimagesizesjsinnerhtmlhtml">trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetchangedynamicallyfromjs1xhtml">trunk/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-1x.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetchangedynamicallyfromjs2xhtml">trunk/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetfraction15xhtml">trunk/LayoutTests/fast/hidpi/image-srcset-fraction-1.5x.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetfractionhtml">trunk/LayoutTests/fast/hidpi/image-srcset-fraction.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetintrinsicsizehtml">trunk/LayoutTests/fast/hidpi/image-srcset-intrinsic-size.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetinvaliddescriptorhtml">trunk/LayoutTests/fast/hidpi/image-srcset-invalid-descriptor.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetinvalidinputsexceptonehtml">trunk/LayoutTests/fast/hidpi/image-srcset-invalid-inputs-except-one.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetnomodifierhtml">trunk/LayoutTests/fast/hidpi/image-srcset-nomodifier.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetonlysrcattributehtml">trunk/LayoutTests/fast/hidpi/image-srcset-only-src-attribute.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetremovedynamicallyfromjshtml">trunk/LayoutTests/fast/hidpi/image-srcset-remove-dynamically-from-js.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetsamealternativeforbothattributeshtml">trunk/LayoutTests/fast/hidpi/image-srcset-same-alternative-for-both-attributes.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetsimple1xhtml">trunk/LayoutTests/fast/hidpi/image-srcset-simple-1x.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetsimple2xhtml">trunk/LayoutTests/fast/hidpi/image-srcset-simple-2x.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetspaceleftnomodifierhtml">trunk/LayoutTests/fast/hidpi/image-srcset-space-left-nomodifier.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetspaceprefixnomodifierhtml">trunk/LayoutTests/fast/hidpi/image-srcset-space-prefix-nomodifier.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetspacesuffixnomodifierhtml">trunk/LayoutTests/fast/hidpi/image-srcset-space-suffix-nomodifier.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetspacesurroundednomodifierhtml">trunk/LayoutTests/fast/hidpi/image-srcset-space-surrounded-nomodifier.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetsrcselection1xbothhtml">trunk/LayoutTests/fast/hidpi/image-srcset-src-selection-1x-both.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetsrcselection1xhtml">trunk/LayoutTests/fast/hidpi/image-srcset-src-selection-1x.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetsrcselection2xhtml">trunk/LayoutTests/fast/hidpi/image-srcset-src-selection-2x.html</a></li>
<li><a href="#trunkLayoutTestsfasthidpiimagesrcsetviewportmodifiershtml">trunk/LayoutTests/fast/hidpi/image-srcset-viewport-modifiers.html</a></li>
<li><a href="#trunkLayoutTestshttptestsloadingsizespreloadimagesizes2xexpectedtxt">trunk/LayoutTests/http/tests/loading/sizes/preload-image-sizes-2x-expected.txt</a></li>
<li><a href="#trunkLayoutTestsresourcessrcsethelperjs">trunk/LayoutTests/resources/srcset-helper.js</a></li>
<li><a href="#trunkLayoutTestssvgcsssvgresourcefragmentidentifierimgsrchtml">trunk/LayoutTests/svg/css/svg-resource-fragment-identifier-img-src.html</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasthidpiresourcessrcsethelperjs">trunk/LayoutTests/fast/hidpi/resources/srcset-helper.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/ChangeLog        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,3 +1,64 @@
</span><ins>+2015-01-20  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        fast/hidpi/image-srcset-change-dynamically-from-js-2x.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=140649
+
+        fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html is failing on some bots
+        https://bugs.webkit.org/show_bug.cgi?id=134769
+
+        Reviewed by Darin Adler.
+
+        Streamline resources/srcset-helper.js and remove races.
+
+        * TestExpectations: Unskip fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html.
+
+        * fast/hidpi/resources/srcset-helper.js: Deleted. We aleady had a copy in /resources,
+        no need for two copies.
+
+        * resources/srcset-helper.js: This script used to depend on setBackingScaleFactor
+        invoke its callback really fast, which is not guaranteed. Also, it had broken logic
+        that used non-existent window.deviceScaleFactor.
+
+        * fast/dom/HTMLImageElement/sizes/image-sizes-2x.html:
+        * fast/dom/HTMLImageElement/sizes/image-sizes-js-change-expected.txt:
+        * fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html:
+        * fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml-expected.txt:
+        * fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml.html:
+        Updated to run the tests from runTest() function, not a load event handler.
+        Where appropriate, changed from testRunner.dumpResourceLoadCallbacks() to
+        testRunner.dumpResourceResponseMIMETypes(), because the latter doesn't unnecessarily
+        include reloaded scripts. It feels somewhat hacky, but the hack is already used in
+        fast/hidpi, and it improves output.
+
+        * fast/hidpi/image-srcset-change-dynamically-from-js-1x.html:
+        * fast/hidpi/image-srcset-change-dynamically-from-js-2x.html:
+        * fast/hidpi/image-srcset-fraction-1.5x.html:
+        * fast/hidpi/image-srcset-fraction.html:
+        * fast/hidpi/image-srcset-intrinsic-size.html:
+        * fast/hidpi/image-srcset-invalid-descriptor.html:
+        * fast/hidpi/image-srcset-invalid-inputs-except-one.html:
+        * fast/hidpi/image-srcset-nomodifier.html:
+        * fast/hidpi/image-srcset-only-src-attribute.html:
+        * fast/hidpi/image-srcset-remove-dynamically-from-js.html:
+        * fast/hidpi/image-srcset-same-alternative-for-both-attributes.html:
+        * fast/hidpi/image-srcset-simple-1x.html:
+        * fast/hidpi/image-srcset-simple-2x.html:
+        * fast/hidpi/image-srcset-space-left-nomodifier.html:
+        * fast/hidpi/image-srcset-space-prefix-nomodifier.html:
+        * fast/hidpi/image-srcset-space-suffix-nomodifier.html:
+        * fast/hidpi/image-srcset-space-surrounded-nomodifier.html:
+        * fast/hidpi/image-srcset-src-selection-1x-both.html:
+        * fast/hidpi/image-srcset-src-selection-1x.html:
+        * fast/hidpi/image-srcset-src-selection-2x.html:
+        * fast/hidpi/image-srcset-viewport-modifiers.html:
+        Updated to run the tests from runTest() function, not a load event handler.
+
+        * http/tests/loading/sizes/preload-image-sizes-2x-expected.txt: Updated results
+        for srcset-helper.js now always starting the redirect after the load is fully finished.
+
+        * svg/css/svg-resource-fragment-identifier-img-src.html: Updated for the unified
+        location of the script.
+
</ins><span class="cx"> 2015-01-20  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove SVGElementInstanceList, m_instanceUnderMouse, DUMP_INSTANCE_TREE, DUMP_SHADOW_TREE
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/TestExpectations        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -116,9 +116,6 @@
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/133057 fast/table/border-collapsing/collapsed-borders-adjoining-sections.html [ ImageOnlyFailure ]
</span><span class="cx"> 
</span><del>-# Failing on some bots due to using resource load callbacks
-webkit.org/b/134769 fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html [ Skip ]
-
</del><span class="cx"> webkit.org/b/128736 inspector-protocol/debugger/setBreakpoint-dfg.html [ Failure Pass ]
</span><span class="cx"> webkit.org/b/134982 inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local.html [ Failure Pass ]
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLImageElementsizesimagesizes2xhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-2x.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-2x.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-2x.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -2,14 +2,15 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     window.targetScaleFactor = 2;
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;../../../hidpi/resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../resources/currentSrcHelper.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     if (window.testRunner)
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx"> 
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         shouldBe('document.getElementById(&quot;simple&quot;).clientWidth', 'window.innerWidth');
</span><span class="cx">         shouldBe('currentSrcFileName(&quot;simple&quot;)', '&quot;image-set-2x.png&quot;');
</span><span class="cx">         shouldBe('document.getElementById(&quot;small_sizes&quot;).clientWidth', '300');
</span><span class="lines">@@ -34,7 +35,7 @@
</span><span class="cx">         shouldBe('currentSrcFileName(&quot;half_size&quot;)', '&quot;image-set-2x.png&quot;');
</span><span class="cx">         shouldBe('document.getElementById(&quot;infitisimal_sizes&quot;).clientWidth', '(window.innerWidth/100)');
</span><span class="cx">         shouldBe('currentSrcFileName(&quot;infitisimal_sizes&quot;)', '&quot;image-set-2x.png&quot;');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;img id=&quot;simple&quot; src=&quot;&quot; sizes=&quot;(max-width: 300px) 400px, 800px&quot; srcset=&quot;../../../hidpi/resources/image-set-1x.png 400w, ../../../hidpi/resources/image-set-2x.png 800w&quot;&gt;
</span><span class="cx"> &lt;img id=&quot;small_sizes&quot; src=&quot;&quot; sizes=&quot;300px&quot; srcset=&quot;../../../hidpi/resources/image-set-1x.png 400w, ../../../hidpi/resources/image-set-2x.png 800w&quot;&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLImageElementsizesimagesizesjschangeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-change-expected.txt (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-change-expected.txt        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-change-expected.txt        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,9 +1,6 @@
</span><del>-image-set-4x.png - willSendRequest &lt;NSURLRequest URL image-set-4x.png, main document URL image-sizes-js-change.html, http method GET&gt; redirectResponse (null)
-js-test.js - didFinishLoading
-image-set-4x.png - didReceiveResponse &lt;NSURLResponse image-set-4x.png, http status code 0&gt;
-image-set-4x.png - didFinishLoading
</del><ins>+image-set-4x.png has MIME type image/png
+PASS currentSrcFileName(&quot;foo&quot;) is &quot;image-set-4x.png&quot;
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span><del>-PASS currentSrcFileName(&quot;foo&quot;) is &quot;image-set-4x.png&quot;
</del><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLImageElementsizesimagesizesjschangehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><del>-&lt;script src=&quot;../../../hidpi/resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../resources/currentSrcHelper.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="lines">@@ -16,12 +16,14 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     addEventListener(&quot;DOMContentLoaded&quot;, function() {
</span><del>-        if (window.testRunner &amp;&amp; sessionStorage.pageReloaded)
-            testRunner.dumpResourceLoadCallbacks();
</del><ins>+        if (sessionStorage.pageReloaded)
+            testRunner.dumpResourceResponseMIMETypes();
</ins><span class="cx">         updateSrc();
</span><span class="cx">     }, false);
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+
+    function runTest()
+    {
</ins><span class="cx">         shouldBe('currentSrcFileName(&quot;foo&quot;)', '&quot;image-set-4x.png&quot;');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;img id=&quot;foo&quot;&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLImageElementsizesimagesizesjsinnerhtmlexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml-expected.txt (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml-expected.txt        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml-expected.txt        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><ins>+image-set-4x.png has MIME type image/png
</ins><span class="cx"> PASS fileName(window.testdiv.children[0].currentSrc) is &quot;image-set-4x.png&quot;
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLImageElementsizesimagesizesjsinnerhtmlhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,4 +1,5 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><ins>+&lt;script src=&quot;../../../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../resources/currentSrcHelper.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="lines">@@ -6,13 +7,14 @@
</span><span class="cx">         testRunner.dumpAsText();
</span><span class="cx"> 
</span><span class="cx">     addEventListener(&quot;DOMContentLoaded&quot;, function() {
</span><del>-        if (window.testRunner &amp;&amp; sessionStorage.pageReloaded)
-            testRunner.dumpResourceRequestCallbacks();
</del><ins>+        if (sessionStorage.pageReloaded)
+            testRunner.dumpResourceResponseMIMETypes();
</ins><span class="cx">         window.testdiv = document.createElement(&quot;div&quot;);
</span><span class="cx">         window.testdiv.innerHTML = '&lt;img id=&quot;foo&quot; src=&quot;../resources/blue-100-px-square.png&quot; srcset=&quot;../../../hidpi/resources/image-set-1x.png 200w, ../../../hidpi/resources/image-set-2x.png 400w, ../resources/image-set-4x.png 800w&quot;&gt;';
</span><span class="cx">     }, false);
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         shouldBe('fileName(window.testdiv.children[0].currentSrc)', '&quot;image-set-4x.png&quot;');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;img id=&quot;foo&quot;&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetchangedynamicallyfromjs1xhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-1x.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-1x.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-1x.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -3,12 +3,11 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     window.targetScaleFactor = 1;
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><span class="cx">     function updateSrc() {
</span><span class="cx">         var img = document.getElementById(&quot;foo&quot;);
</span><span class="lines">@@ -20,11 +19,13 @@
</span><span class="cx">     addEventListener(&quot;DOMContentLoaded&quot;, function() {
</span><span class="cx">         updateSrc();
</span><span class="cx">     }, false);
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+
+    function runTest()
+    {
</ins><span class="cx">         if (internals)
</span><span class="cx">             shouldBeFalse('internals.isPreloaded(&quot;resources/green-200-px-square.png&quot;)');
</span><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==100');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetchangedynamicallyfromjs2xhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,11 +1,10 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><span class="cx">     function updateSrc() {
</span><span class="cx">         var img = document.getElementById(&quot;foo&quot;);
</span><span class="lines">@@ -19,9 +18,11 @@
</span><span class="cx">             testRunner.dumpResourceResponseMIMETypes();
</span><span class="cx">         updateSrc();
</span><span class="cx">     }, false);
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+
+    function runTest()
+    {
</ins><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==200');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetfraction15xhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-fraction-1.5x.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-fraction-1.5x.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-fraction-1.5x.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -3,17 +3,17 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     window.targetScaleFactor = 1.5;
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         if (internals)
</span><span class="cx">             shouldBeTrue('document.getElementById(&quot;testimg&quot;).clientWidth==200');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetfractionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-fraction.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-fraction.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-fraction.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -3,13 +3,14 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     window.targetScaleFactor = 2.5;
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         if (internals)
</span><span class="cx">             shouldBeTrue('document.getElementById(&quot;testimg&quot;).clientWidth==200');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetintrinsicsizehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-intrinsic-size.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-intrinsic-size.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-intrinsic-size.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -2,19 +2,18 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     window.targetScaleFactor = 2;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest() {
</ins><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==200');
</span><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo2&quot;).clientWidth==400');
</span><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo3&quot;).clientWidth==100');
</span><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo4&quot;).clientWidth==200');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetinvaliddescriptorhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-invalid-descriptor.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-invalid-descriptor.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-invalid-descriptor.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -3,17 +3,17 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     window.targetScaleFactor = 1;
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest() {
</ins><span class="cx">         shouldBe('document.getElementById(&quot;invalid_with_x&quot;).clientWidth', '100');
</span><span class="cx">         shouldBe('document.getElementById(&quot;invalid_without_x&quot;).clientWidth', '100');
</span><span class="cx">         shouldBe('document.getElementById(&quot;future_descriptor&quot;).clientWidth', '100');
</span><span class="cx">         shouldBe('document.getElementById(&quot;future_descriptor_without_x&quot;).clientWidth', '100');
</span><span class="cx">         shouldBe('document.getElementById(&quot;x_with_w_ignored&quot;).clientWidth', '200');
</span><span class="cx">         shouldBe('document.getElementById(&quot;x_with_h_ignored&quot;).clientWidth', '200');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetinvalidinputsexceptonehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-invalid-inputs-except-one.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-invalid-inputs-except-one.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-invalid-inputs-except-one.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,15 +1,15 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==200');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetnomodifierhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-nomodifier.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-nomodifier.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-nomodifier.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,15 +1,15 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==150');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetonlysrcattributehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-only-src-attribute.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-only-src-attribute.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-only-src-attribute.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,14 +1,15 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;html&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><ins>+
+    function runTest()
+    {
+        shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==200');
</ins><span class="cx">     }
</span><del>-    addEventListener(&quot;load&quot;, function() {
-        shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==200');
-    }, false);
</del><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body id=&quot;body&quot;&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetremovedynamicallyfromjshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-remove-dynamically-from-js.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-remove-dynamically-from-js.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-remove-dynamically-from-js.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -3,12 +3,11 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     window.targetScaleFactor = 1;
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><span class="cx">     function updateSrc() {
</span><span class="cx">         var img = document.getElementById(&quot;foo&quot;);
</span><span class="lines">@@ -19,9 +18,11 @@
</span><span class="cx">     addEventListener(&quot;DOMContentLoaded&quot;, function() {
</span><span class="cx">         updateSrc();
</span><span class="cx">     }, false);
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+
+    function runTest()
+    {
</ins><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==200');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body id=&quot;body&quot;&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetsamealternativeforbothattributeshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-same-alternative-for-both-attributes.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-same-alternative-for-both-attributes.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-same-alternative-for-both-attributes.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -3,18 +3,18 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     window.targetScaleFactor = 1;
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         if (internals)
</span><span class="cx">             shouldBeFalse('internals.isPreloaded(&quot;resources/green-200-px-square.png&quot;)');
</span><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==100');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetsimple1xhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-simple-1x.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-simple-1x.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-simple-1x.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -3,16 +3,16 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     window.targetScaleFactor = 1;
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==400');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetsimple2xhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-simple-2x.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-simple-2x.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-simple-2x.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -3,12 +3,13 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     window.targetScaleFactor = 2;
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==200');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetspaceleftnomodifierhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-space-left-nomodifier.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-space-left-nomodifier.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-space-left-nomodifier.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,15 +1,15 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==150');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetspaceprefixnomodifierhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-space-prefix-nomodifier.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-space-prefix-nomodifier.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-space-prefix-nomodifier.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,15 +1,15 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==150');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetspacesuffixnomodifierhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-space-suffix-nomodifier.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-space-suffix-nomodifier.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-space-suffix-nomodifier.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,15 +1,15 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==150');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetspacesurroundednomodifierhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-space-surrounded-nomodifier.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-space-surrounded-nomodifier.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-space-surrounded-nomodifier.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,15 +1,15 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==150');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetsrcselection1xbothhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-src-selection-1x-both.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-src-selection-1x-both.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-src-selection-1x-both.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -3,16 +3,16 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     window.targetScaleFactor = 2;
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==400');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetsrcselection1xhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-src-selection-1x.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-src-selection-1x.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-src-selection-1x.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -3,16 +3,16 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     window.targetScaleFactor = 1;
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==100');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetsrcselection2xhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-src-selection-2x.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-src-selection-2x.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-src-selection-2x.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -3,16 +3,16 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     window.targetScaleFactor = 2;
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==200');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiimagesrcsetviewportmodifiershtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/hidpi/image-srcset-viewport-modifiers.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/image-srcset-viewport-modifiers.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/image-srcset-viewport-modifiers.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -3,16 +3,16 @@
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     window.targetScaleFactor = 2;
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-    if (window.testRunner) {
</del><ins>+    if (window.testRunner)
</ins><span class="cx">         testRunner.dumpAsText();
</span><del>-    }
</del><span class="cx"> 
</span><del>-    addEventListener(&quot;load&quot;, function() {
</del><ins>+    function runTest()
+    {
</ins><span class="cx">         shouldBeTrue('document.getElementById(&quot;foo&quot;).clientWidth==100');
</span><del>-    }, false);
</del><ins>+    }
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfasthidpiresourcessrcsethelperjs"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/hidpi/resources/srcset-helper.js (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/hidpi/resources/srcset-helper.js        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/fast/hidpi/resources/srcset-helper.js        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,33 +0,0 @@
</span><del>-function runTest() {
-    if (!window.testRunner || !window.sessionStorage)
-        return;
-
-    if (!window.targetScaleFactor)
-        window.targetScaleFactor = 2;
-
-    if(!sessionStorage.pageReloaded &amp;&amp; window.targetScaleFactor == window.deviceScaleFactor)
-        return;
-
-    if (!sessionStorage.scaleFactorIsSet) {
-        testRunner.waitUntilDone();
-        testRunner.setBackingScaleFactor(targetScaleFactor, scaleFactorIsSet);
-    }
-
-    if (sessionStorage.pageReloaded &amp;&amp; sessionStorage.scaleFactorIsSet) {
-        delete sessionStorage.pageReloaded;
-        delete sessionStorage.scaleFactorIsSet;
-        if (!window.manualNotifyDone)
-            testRunner.notifyDone();
-    } else {
-        // Right now there is a bug that srcset does not properly deal with dynamic changes to the scale factor,
-        // so to work around that, we must reload the page to get the new image.
-        sessionStorage.pageReloaded = true;
-        document.location.reload(true);
-    }
-}
-
-function scaleFactorIsSet() {
-    sessionStorage.scaleFactorIsSet = true;
-}
-
-window.addEventListener(&quot;load&quot;, runTest, false);
</del></span></pre></div>
<a id="trunkLayoutTestshttptestsloadingsizespreloadimagesizes2xexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/loading/sizes/preload-image-sizes-2x-expected.txt (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/loading/sizes/preload-image-sizes-2x-expected.txt        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/http/tests/loading/sizes/preload-image-sizes-2x-expected.txt        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,9 +1,9 @@
</span><span class="cx"> main frame - didStartProvisionalLoadForFrame
</span><span class="cx"> main frame - didCommitLoadForFrame
</span><span class="cx"> main frame - didFinishDocumentLoadForFrame
</span><del>-main frame - willPerformClientRedirectToURL: http://127.0.0.1:8000/loading/sizes/preload-image-sizes-2x.html 
</del><span class="cx"> main frame - didHandleOnloadEventsForFrame
</span><span class="cx"> main frame - didFinishLoadForFrame
</span><ins>+main frame - willPerformClientRedirectToURL: http://127.0.0.1:8000/loading/sizes/preload-image-sizes-2x.html 
</ins><span class="cx"> main frame - didStartProvisionalLoadForFrame
</span><span class="cx"> main frame - didCancelClientRedirectForFrame
</span><span class="cx"> main frame - didCommitLoadForFrame
</span></span></pre></div>
<a id="trunkLayoutTestsresourcessrcsethelperjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/resources/srcset-helper.js (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/resources/srcset-helper.js        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/resources/srcset-helper.js        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -1,33 +1,33 @@
</span><del>-function runTest() {
</del><ins>+window.addEventListener(&quot;load&quot;, function () {
</ins><span class="cx">     if (!window.testRunner || !window.sessionStorage)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (!window.targetScaleFactor)
</span><span class="cx">         window.targetScaleFactor = 2;
</span><span class="cx"> 
</span><del>-    if(!sessionStorage.pageReloaded &amp;&amp; window.targetScaleFactor == window.deviceScaleFactor)
-        return;
</del><ins>+    var needsBackingScaleFactorChange = window.targetScaleFactor != 1 &amp;&amp; !sessionStorage.pageReloaded;
</ins><span class="cx"> 
</span><del>-    if (!sessionStorage.scaleFactorIsSet) {
</del><ins>+    if (needsBackingScaleFactorChange) {
</ins><span class="cx">         testRunner.waitUntilDone();
</span><del>-        testRunner.setBackingScaleFactor(targetScaleFactor, scaleFactorIsSet);
</del><ins>+        testRunner.setBackingScaleFactor(targetScaleFactor, function() {
+            // Right now there is a bug that srcset does not properly deal with dynamic changes to the scale factor,
+            // so to work around that, we must reload the page to get the new image.
+            sessionStorage.pageReloaded = true;
+            setTimeout(function() { document.location.reload(true) }, 0);
+        });
+        return;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (sessionStorage.pageReloaded &amp;&amp; sessionStorage.scaleFactorIsSet) {
-        delete sessionStorage.pageReloaded;
-        delete sessionStorage.scaleFactorIsSet;
-        if (!window.manualNotifyDone)
-            testRunner.notifyDone();
-    } else {
-        // Right now there is a bug that srcset does not properly deal with dynamic changes to the scale factor,
-        // so to work around that, we must reload the page to get the new image.
-        sessionStorage.pageReloaded = true;
-        document.location.reload(true);
</del><ins>+    try {
+        if (window.runTest)
+            runTest();
+    } catch (ex) {
+        testFailed(&quot;Uncaught exception&quot; + ex);
</ins><span class="cx">     }
</span><del>-}
</del><span class="cx"> 
</span><del>-function scaleFactorIsSet() {
-    sessionStorage.scaleFactorIsSet = true;
-}
</del><ins>+    var didReload = sessionStorage.pageReloaded;
+    delete sessionStorage.pageReloaded;
</ins><span class="cx"> 
</span><del>-window.addEventListener(&quot;load&quot;, runTest, false);
</del><ins>+    if (didReload)
+        testRunner.notifyDone();
+});
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcsssvgresourcefragmentidentifierimgsrchtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/css/svg-resource-fragment-identifier-img-src.html (178720 => 178721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/svg-resource-fragment-identifier-img-src.html        2015-01-20 17:51:29 UTC (rev 178720)
+++ trunk/LayoutTests/svg/css/svg-resource-fragment-identifier-img-src.html        2015-01-20 18:26:00 UTC (rev 178721)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx">     &lt;script&gt;
</span><span class="cx">         window.targetScaleFactor = 2;
</span><span class="cx">     &lt;/script&gt;
</span><del>-    &lt;script src=&quot;../../fast/hidpi/resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</del><ins>+    &lt;script src=&quot;../../resources/srcset-helper.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;style type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
</span><span class="cx">         
</span><span class="cx">         div, img {
</span></span></pre>
</div>
</div>

</body>
</html>