Unreviewed post-review test fixup
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Aug 2014 23:55:40 +0000 (23:55 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Aug 2014 23:55:40 +0000 (23:55 +0000)
* editing/pasteboard/img-srcset-copy-paste-canonicalization.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171958 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/img-srcset-copy-paste-canonicalization.html

index f656c97210e7e50d6dfb3b0b463ee90bf9ad6036..80ee12b917c3d6abb83e3a83bb39ccaaf00158e5 100644 (file)
@@ -1,3 +1,9 @@
+2014-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Unreviewed post-review test fixup
+
+        * editing/pasteboard/img-srcset-copy-paste-canonicalization.html:
+
 2014-08-01  Beth Dakin  <bdakin@apple.com>
 
         REGRESSION (r171891): platform/mac/fast/scrolling/scroll-select-bottom-test.html        
index efb6797f9531ab43e4a2e8bc1967f99a0cbc9fd1..427c6679f0f54f3cbebfcdb935eaed7712e51361 100644 (file)
     var sourceImageSegments;
     var destinationImageSegments;
 
+    var finishTestCount = 0;
+    function maybeFinishTest() {
+        ++finishTestCount;
+        if (finishTestCount == 2)
+            finishJSTest();
+    }
+
     function runTests(href) {
         iframeHref = href;
 
 
         destinationImage.onerror = function() {
             testFailed("Image should not fail to load");
-            finishJSTest();
+            maybeFinishTest();
         }
-        image.onload = function() {
-            finishJSTest();
+        destinationImage.onload = function() {
+            maybeFinishTest();
         }
 
         sourceImageSegments = sourceImage.getAttribute("srcset").split(" ");
@@ -69,6 +76,7 @@
         shouldBe("destinationImageSegments[1]", "\"2x,\"");
         shouldBe("sourceImageSegments[3]", "\"1x\"");
         shouldBe("destinationImageSegments[3]", "\"1x\"");
+        maybeFinishTest();
     }
 </script>
 <script src="../../resources/js-test-post.js"></script>