summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/shadow/shadow-aware-create-shadow-root.html
blob: 2d35d47a6054c868d3c12bd94579a7e42aec968a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script>
description("Tests for ShadowAware JS APIs.");
Element.prototype.createShadowRoot = Element.prototype.createShadowRoot || Element.prototype.createShadowRoot;

// ShadowAware.createShadowRoot()
var host = document.createElement('div');
var root1 = host.createShadowRoot();
var root2 = host.createShadowRoot();
shouldNotBe("root1", "root2");
shouldBe("root1", "window.internals.oldestShadowRoot(host)");
shouldBe("root2", "window.internals.youngestShadowRoot(host)");

</script>
</body>
</html>