summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/Element/id-in-insert-hr.html
blob: 9bb4004aa55f5451e09fde22e3ff08c0aa2cf966 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<html>
<head>
<script src="../../js/resources/js-test-pre.js"></script>
</head>
<body>

<div id="test1" contenteditable="true">foobar</div>

<script>
description("Test using id in execCommand(InsertHorizontalRule)");

var s = window.getSelection();
var e = document.getElementById("test1");
s.setPosition(e, 0);

var id = "hr";
document.execCommand("InsertHorizontalRule", false, id);
var hr = document.getElementById(id);

shouldBeNonNull('hr');
</script>
</body>
</html>