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

Unified Diff: third_party/WebKit/LayoutTests/fast/workers/resources/worker-xhr-microtasks.js

Issue 1940253002: Disallow certain blocking DOM calls during microtask execution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 7 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/resources/worker-xhr-microtasks.js
diff --git a/third_party/WebKit/LayoutTests/fast/workers/resources/worker-xhr-microtasks.js b/third_party/WebKit/LayoutTests/fast/workers/resources/worker-xhr-microtasks.js
new file mode 100644
index 0000000000000000000000000000000000000000..f60dad173fcdd4e995269af066818e5fa5107232
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/workers/resources/worker-xhr-microtasks.js
@@ -0,0 +1,13 @@
+onmessage = function(evt) {
+ new Promise(function(res,rej) { res(); }).then(function() {
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", "http://example.test", false);
+ try {
+ xhr.send();
+ console.log("FAIL: xhr.send() didn't throw");
+ } catch (e) {
+ console.log("PASS: xhr.send() throws as expected");
+ }
+ postMessage("done");
+ });
+};

Powered by Google App Engine
This is Rietveld 408576698