summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/HTMLHtmlElement/set-version.html
blob: 2e45aad58975fa64f4468083cd4c9edb58677c9a (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
<html version="1">
<body>
<p>
This tests to make sure that HTMLHtmlElement::version settable.</p>
You should see 2 lines with "SUCCESS" below:
<script>
if (window.layoutTestController)
    layoutTestController.dumpAsText();

function checkExpected(actual, expected)
{
    if (actual != expected)
        document.writeln("<p>FAILURE: expected \"" + expected + "\", actual \"" + actual + "\"</p>");
    else
        document.writeln("<p>SUCCESS (value: \"" + actual + "\")</p>");
}

var htmlElement = document.getElementsByTagName("html")[0];
checkExpected(htmlElement.version, 1);
htmlElement.version = 2;
checkExpected(htmlElement.version, 2);
</script>
</body>
</html>