blob: a12768f8b989bfbc23b7119eb83fe2d0642ee547 (
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
27
28
29
30
31
32
33
34
35
36
37
38
|
<head>
<script src="../../resources/js-test.js"></script>
<style>
.test {
font-family: 'myahem';
}
#a, #b, #container { position:absolute; }
#b { top: 20px }
</style>
</head>
<div id=container>
<div id=a>Text</div>
<div id=b class="test">Text</div>
</div>
<script>
jsTestIsAsync = true;
window.setTimeout(
function() {
var link = document.createElement("link");
link.setAttribute("href", "resources/ahem.css");
link.setAttribute("rel", "stylesheet");
link.setAttribute("type", "text/css");
document.head.appendChild(link);
window.setTimeout(
function() {
var a = document.getElementById('a');
var b = document.getElementById('b');
shouldBeFalse('window.getComputedStyle(a).width == window.getComputedStyle(b).width');
finishJSTest();
},
500
);
},
1);
</script>
|