Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <title>User-agent level style sheet defaults for an iframe</title> | |
|
Julien - ping for review
2015/03/04 01:07:37
Using <title> is useless in test. If it is meaning
philipj_slow
2015/03/04 07:15:28
With testharness.js the <title> becomes the test t
Julien - ping for review
2015/03/04 17:50:22
Can you include the output of these tests? I think
philipj_slow
2015/03/05 04:05:06
There's a hook to prevent all-passing testharness.
Julien - ping for review
2015/03/05 18:19:03
OK, I think that's OK. It's kinda weird to dump th
philipj_slow
2015/03/06 02:43:40
This is because it's possible to have multiple tes
| |
| 3 <script src="../../resources/testharness.js"></script> | |
| 4 <script src="../../resources/testharnessreport.js"></script> | |
| 5 <script src="../trusted-event.js"></script> | |
| 6 <style> | |
| 7 iframe { | |
| 8 /* Try to override everything which is !important in the UA style sheet. */ | |
| 9 position: relative !important; | |
| 10 top: auto !important; | |
| 11 right: auto !important; | |
| 12 bottom: auto !important; | |
| 13 left: auto !important; | |
| 14 margin: 10px !important; | |
| 15 box-sizing: content-box !important; | |
| 16 min-width: 50% !important; | |
| 17 max-width: 50% !important; | |
| 18 min-height: 50% !important; | |
| 19 max-height: 50% !important; | |
| 20 object-fit: none !important; | |
| 21 border: 1px solid black; /* not !important in the UA style sheet */ | |
| 22 } | |
| 23 </style> | |
| 24 <div id="log"></div> | |
| 25 <iframe></iframe> | |
| 26 <script> | |
| 27 async_test(function() | |
| 28 { | |
| 29 var iframe = document.querySelector("iframe"); | |
| 30 | |
| 31 document.addEventListener("fullscreenchange", this.step_func_done(function() | |
| 32 { | |
| 33 var style = getComputedStyle(iframe); | |
| 34 // All properties except border should match the UA style sheet. | |
| 35 assert_equals(style.position, "fixed"); | |
| 36 assert_equals(style.top, "0px"); | |
| 37 assert_equals(style.right, "0px"); | |
| 38 assert_equals(style.bottom, "0px"); | |
| 39 assert_equals(style.left, "0px"); | |
| 40 assert_equals(style.margin, "0px"); | |
| 41 assert_equals(style.boxSizing, "border-box"); | |
| 42 assert_equals(style.minWidth, "0px"); | |
| 43 assert_equals(style.maxWidth, "none"); | |
| 44 assert_equals(style.minHeight, "0px"); | |
| 45 assert_equals(style.maxHeight, "none"); | |
| 46 assert_equals(style.width, window.innerWidth + "px"); | |
| 47 assert_equals(style.height, window.innerHeight + "px"); | |
|
Julien - ping for review
2015/03/04 01:07:37
width and height are not overriden
philipj_slow
2015/03/04 07:15:28
I removed them when I noticed it doesn't make any
| |
| 48 assert_equals(style.objectFit, "contain"); | |
| 49 assert_equals(style.flex, "0 0 auto"); | |
|
Julien - ping for review
2015/03/04 01:07:37
Nor is flex
philipj_slow
2015/03/04 07:15:28
Done.
| |
| 50 assert_equals(style.transform, "none"); | |
|
Julien - ping for review
2015/03/04 01:07:37
Nor transform.
philipj_slow
2015/03/04 07:15:28
Done.
| |
| 51 assert_equals(style.borderStyle, "solid"); | |
| 52 })); | |
| 53 | |
| 54 trusted_request(iframe); | |
| 55 }); | |
| 56 </script> | |
| OLD | NEW |