Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: third_party/WebKit/LayoutTests/fast/workers/dedicated-worker-error-event.html

Issue 2804533002: Update Error Event inside a worker to provide the exact exception value (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/workers/dedicated-worker-error-event.html
diff --git a/third_party/WebKit/LayoutTests/fast/workers/dedicated-worker-error-event.html b/third_party/WebKit/LayoutTests/fast/workers/dedicated-worker-error-event.html
new file mode 100644
index 0000000000000000000000000000000000000000..2a9f0f15ac8dd0302e88c3add93ceca1c64d2b92
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/workers/dedicated-worker-error-event.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Dedicated Worker: Error event error message</title>
+<script src=../../resources/testharness.js></script>
+<script src=../../resources/testharnessreport.js></script>
+<script>
+var t = async_test('Error handlers inside a worker should see the error value');
+
+test(function() {
shimazu 2017/04/05 07:23:22 Could you use promise_test to write async test lik
yiyix 2017/04/05 09:02:55 Done.
+ var worker = new Worker('resources/error-script.js');
+ worker.onmessage = t.step_func(function(e) {
+ var data = e.data;
shimazu 2017/04/05 07:23:22 You can use e.data directly for checking the param
yiyix 2017/04/05 09:02:55 Done.
+ assert_true(data.source == 'event listener');
shimazu 2017/04/05 07:23:22 asser_equals is preferable for comparison.
yiyix 2017/04/05 09:02:55 Done.
+ assert_equals(data.value, 'testError');
+ t.done();
+ });
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698