summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/dom/render-blocking/remove-attr-script-keeps-blocking.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/dom/render-blocking/remove-attr-script-keeps-blocking.html')
-rw-r--r--testing/web-platform/tests/html/dom/render-blocking/remove-attr-script-keeps-blocking.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/dom/render-blocking/remove-attr-script-keeps-blocking.html b/testing/web-platform/tests/html/dom/render-blocking/remove-attr-script-keeps-blocking.html
new file mode 100644
index 0000000000..451d2f3695
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/render-blocking/remove-attr-script-keeps-blocking.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<title>Synchronous script element still blocks rendering after removing `blocking=render`</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/test-render-blocking.js"></script>
+
+<script>
+// Test script must be added before the synchronous script because the
+// synchronous script is parser-blocking.
+
+promise_setup(async () => {
+ let script = await nodeInserted(document.head, node => node.id === 'script');
+ script.blocking = '';
+
+ // Also inserts some contents for non-compliant UA to render
+ document.body = document.createElement('body');
+ document.body.appendChild(document.createTextNode('Some text'));
+});
+
+test_render_blocking(
+ () => assert_equals(window.dummy, 1),
+ 'Render-blocking script is loaded and evaluated');
+</script>
+
+<script id="script" blocking="render" src="support/dummy-1.js?pipe=trickle(d1)"></script>