summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/html/import-node-into-quirks-document.html
blob: 8df5691d89f34167664f6e1b5d4056878ec91093 (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
26
<!-- quirks mode -->

<script src="../../fast/js/resources/js-test-pre.js"></script>

<style>
    .casesensitive { border: 1px solid red; }
</style>

<iframe id="standards-mode"></iframe>

<script>
description('Bug 257221: Moving an element from a standards mode document to a quirks mode one should handle the case difference of the id and class attributes');

var iframeDoc = document.getElementById('standards-mode').contentDocument;

iframeDoc.open();
iframeDoc.write('<!DOCTYPE html><div id="caseSensitive" class="caseSensitive">caseSensitive</div>');
iframeDoc.close();

div = iframeDoc.getElementById('caseSensitive');
document.body.appendChild(div);
shouldBe('document.querySelector("#caseSensitive")', 'div');
shouldBe('document.getElementById("caseSensitive")', 'div');
shouldBeEqualToString('getComputedStyle(div).borderTopWidth', '1px');
</script>