Title: [171958] trunk/LayoutTests
Revision
171958
Author
mmaxfi...@apple.com
Date
2014-08-01 16:55:40 -0700 (Fri, 01 Aug 2014)

Log Message

Unreviewed post-review test fixup

* editing/pasteboard/img-srcset-copy-paste-canonicalization.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (171957 => 171958)


--- trunk/LayoutTests/ChangeLog	2014-08-01 23:22:44 UTC (rev 171957)
+++ trunk/LayoutTests/ChangeLog	2014-08-01 23:55:40 UTC (rev 171958)
@@ -1,3 +1,9 @@
+2014-08-01  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        Unreviewed post-review test fixup
+
+        * editing/pasteboard/img-srcset-copy-paste-canonicalization.html:
+
 2014-08-01  Beth Dakin  <bda...@apple.com>
 
         REGRESSION (r171891): platform/mac/fast/scrolling/scroll-select-bottom-test.html        

Modified: trunk/LayoutTests/editing/pasteboard/img-srcset-copy-paste-canonicalization.html (171957 => 171958)


--- trunk/LayoutTests/editing/pasteboard/img-srcset-copy-paste-canonicalization.html	2014-08-01 23:22:44 UTC (rev 171957)
+++ trunk/LayoutTests/editing/pasteboard/img-srcset-copy-paste-canonicalization.html	2014-08-01 23:55:40 UTC (rev 171958)
@@ -27,6 +27,13 @@
     var sourceImageSegments;
     var destinationImageSegments;
 
+    var finishTestCount = 0;
+    function maybeFinishTest() {
+        ++finishTestCount;
+        if (finishTestCount == 2)
+            finishJSTest();
+    }
+
     function runTests(href) {
         iframeHref = href;
 
@@ -53,10 +60,10 @@
 
         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=""
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to