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

Unified Diff: third_party/WebKit/LayoutTests/shadow-dom/shadowroot-mode.html

Issue 1841353002: Implement ShadowRoot.mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modify test results Created 4 years, 9 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/shadow-dom/shadowroot-mode.html
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/shadowroot-mode.html b/third_party/WebKit/LayoutTests/shadow-dom/shadowroot-mode.html
new file mode 100644
index 0000000000000000000000000000000000000000..d65d6e3637be9315739bfb70e0478a668e9dfe17
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/shadow-dom/shadowroot-mode.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<div id="log"></div>
+<div id = "host1"></div>
+<div id = "host2"></div>
+<div id = "host3"></div>
+<script>
+
+test(function() {
+ var host1 = document.getElementById('host1');
+ var host2 = document.getElementById('host2');
+ var host3 = document.getElementById('host3');
+ host1.attachShadow({mode : 'open'});
+ var closedShadowRoot = host2.attachShadow({mode : 'closed'});
+ host3.createShadowRoot();
+ assert_equals(host1.shadowRoot.mode, 'open');
+ assert_equals(closedShadowRoot.mode, 'closed');
+ assert_equals(host3.shadowRoot.mode, 'open');
+}, 'ShadowRoot.mode should return open or closed, and only open if v0.');
+</script>

Powered by Google App Engine
This is Rietveld 408576698