Title: [189093] trunk/LayoutTests
Revision
189093
Author
calva...@igalia.com
Date
2015-08-28 02:48:41 -0700 (Fri, 28 Aug 2015)

Log Message

Layout Test streams/reference-implementation/readable-stream.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=148320

Reviewed by Alexey Proskuryakov.

* streams/reference-implementation/readable-stream.html: Set the timeouts at the last moment so that it is less
likely to hit them earlier that we should.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (189092 => 189093)


--- trunk/LayoutTests/ChangeLog	2015-08-28 09:11:33 UTC (rev 189092)
+++ trunk/LayoutTests/ChangeLog	2015-08-28 09:48:41 UTC (rev 189093)
@@ -1,3 +1,13 @@
+2015-08-28  Xabier Rodriguez Calvar  <calva...@igalia.com>
+
+        Layout Test streams/reference-implementation/readable-stream.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=148320
+
+        Reviewed by Alexey Proskuryakov.
+
+        * streams/reference-implementation/readable-stream.html: Set the timeouts at the last moment so that it is less
+        likely to hit them earlier that we should.
+
 2015-08-28  Carlos Garcia Campos  <cgar...@igalia.com>
 
         Unreviewed GTK+ gardening. Skip inspector tests timing out after r188639.

Modified: trunk/LayoutTests/streams/reference-implementation/readable-stream.html (189092 => 189093)


--- trunk/LayoutTests/streams/reference-implementation/readable-stream.html	2015-08-28 09:11:33 UTC (rev 189092)
+++ trunk/LayoutTests/streams/reference-implementation/readable-stream.html	2015-08-28 09:48:41 UTC (rev 189093)
@@ -268,12 +268,13 @@
 
     startPromise.then(test6.step_func(function() {
         assert_equals(pullCount, 1, 'pull should be called once start finishes');
+
+        setTimeout(test6.step_func(function() {
+            assert_equals(pullCount, 1, 'pull should be called exactly once');
+            test6.done();
+        }), 1000);
     }));
 
-    setTimeout(test6.step_func(function() {
-        assert_equals(pullCount, 1, 'pull should be called exactly once');
-        test6.done();
-    }), 1000);
 });
 
 var test7 = async_test('ReadableStream: should call pull when trying to read from a started, empty stream');
@@ -327,14 +328,14 @@
     rs.getReader().read().then(test8.step_func(function(r) {
         assert_object_equals(r, { value: 'a', done: false }, 'first read() should return first chunk');
         assert_equals(pullCount, 1, 'pull should not have been called again');
+
+        setTimeout(test8.step_func(function() {
+            assert_equals(pullCount, 1, 'pull should be called exactly once');
+            test8.done();
+        }), 1000);
     }));
 
     assert_equals(pullCount, 0, 'calling read() should not cause pull to be called yet');
-
-    setTimeout(test8.step_func(function() {
-        assert_equals(pullCount, 1, 'pull should be called exactly once');
-        test8.done();
-    }), 1000);
 });
 
 var test9 = async_test('ReadableStream: should only call pull once on a non-empty stream read from after start fulfills');
@@ -529,6 +530,18 @@
         },
         pull: function(c) {
             c.enqueue(++timesCalled);
+
+            if (timesCalled == 4) {
+                setTimeout(test14.step_func(function() {
+                    // after start: size = 0, pull()
+                    // after enqueue(1): size = 1, pull()
+                    // after enqueue(2): size = 2, pull()
+                    // after enqueue(3): size = 3, pull()
+                    // after enqueue(4): size = 4, do not pull
+                    assert_equals(timesCalled, 4, 'pull() should have been called four times');
+                    test14.done();
+                }), 1000);
+            }
         }
     },
     {
@@ -537,16 +550,6 @@
         },
         highWaterMark: 4
     });
-
-    setTimeout(test14.step_func(function() {
-        // after start: size = 0, pull()
-        // after enqueue(1): size = 1, pull()
-        // after enqueue(2): size = 2, pull()
-        // after enqueue(3): size = 3, pull()
-        // after enqueue(4): size = 4, do not pull
-        assert_equals(timesCalled, 4, 'pull() should have been called four times');
-        test14.done();
-    }), 1000);
 });
 
 var test15 = async_test('ReadableStream pull should be able to close a stream.');
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to