8 <script src=
"../../resources/js-test.js"></script>
9 <body onload=
"update()">
13 var iframe
= document
.querySelector("iframe");
14 var doc
= iframe
.contentDocument
;
15 var p
= doc
.createElement('p');
19 doc
.body
.appendChild(p
);
21 var style
= doc
.createElement('style');
22 style
.textContent
= '@media all and (min-height: 10px) and (min-width: 10px) { #y1 { text-transform: uppercase; } }';
23 doc
.head
.appendChild(style
);
25 // here the viewport is 0x0
26 shouldBe('iframe.contentDocument.defaultView.getComputedStyle(p).textTransform', '"none"');
27 iframe
.setAttribute("style", "height: 100px; width: 100px");
28 // now the viewport is more than 10px X 10px
29 shouldBe('iframe.contentDocument.defaultView.getComputedStyle(p).textTransform', '"uppercase"');