summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/label/labels-custom-property.html
blob: 5cb32d55c52cb407ca675261da933d8f16c9f9f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description('Test that we can set and get custom properties on the labels attribute. ');

var parentDiv = document.createElement('div');

parentDiv.innerHTML = '<button id="btn"></button><label id="lbl1" for="btn"></label><label id="lbl2" for="btn"></label>';

document.body.appendChild(parentDiv);

labels = document.getElementById("btn").labels;
labels.customProperty = 1;
gc();
shouldBe('labels.customProperty', '1');
shouldBe('document.getElementById("btn").labels.customProperty', '1');
</script>
</body>
</html>