Chromium Code Reviews| 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..1ab36b76d2a480252558239b235a5916e78f5674 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/shadow-dom/shadowroot-mode.html |
| @@ -0,0 +1,22 @@ |
| +<!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> |
| +<input id="input"> |
| +<script> |
| + |
| +test(function() { |
| + 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'); |
|
kochi
2016/03/31 10:34:02
nit: moving this line (17) below the comment would
|
| + // Note: mode for V0 shadow and UA shadow is not specified anywhere, |
| + // Blink returns reasonable default values for these. |
| + assert_equals(internals.shadowRoot(input).mode, 'closed'); |
| +}, 'ShadowRoot.mode should return open or closed, and only open if v0.'); |
| +</script> |