chromium/third_party/blink/web_tests/shadow-dom/attach-shadow-mode.html

<!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.attachShadow({mode: 'open'});
  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>