Title: [229119] trunk/LayoutTests/imported/w3c
- Revision
- 229119
- Author
- commit-qu...@webkit.org
- Date
- 2018-02-28 18:18:09 -0800 (Wed, 28 Feb 2018)
Log Message
Make LayoutTests wait_for_state fail after a given period of time
https://bugs.webkit.org/show_bug.cgi?id=183039
Patch by Youenn Fablet <you...@apple.com> on 2018-02-28
Reviewed by Chris Dumez.
This will allow further investigating why some tests are timing out.
* web-platform-tests/service-workers/service-worker/resources/test-helpers.sub.js:
(wait_for_state):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (229118 => 229119)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2018-03-01 02:15:23 UTC (rev 229118)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2018-03-01 02:18:09 UTC (rev 229119)
@@ -1,3 +1,15 @@
+2018-02-28 Youenn Fablet <you...@apple.com>
+
+ Make LayoutTests wait_for_state fail after a given period of time
+ https://bugs.webkit.org/show_bug.cgi?id=183039
+
+ Reviewed by Chris Dumez.
+
+ This will allow further investigating why some tests are timing out.
+
+ * web-platform-tests/service-workers/service-worker/resources/test-helpers.sub.js:
+ (wait_for_state):
+
2018-02-27 Antoine Quint <grao...@apple.com>
[Web Animations] Correct implementation of pending tasks and promises
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/test-helpers.sub.js (229118 => 229119)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/test-helpers.sub.js 2018-03-01 02:15:23 UTC (rev 229118)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/test-helpers.sub.js 2018-03-01 02:18:09 UTC (rev 229119)
@@ -122,11 +122,14 @@
}
}
- return new Promise(test.step_func(function(resolve) {
+ return new Promise(test.step_func(function(resolve, reject) {
worker.addEventListener('statechange', test.step_func(function() {
if (worker.state === state)
resolve(state);
}));
+ test.step_timeout(() => {
+ reject("wait_for_state timed out, waiting for state " + state + ", worker state is " + worker.state);
+ }, 10000);
}));
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes