Index: LayoutTests/fullscreen/rendering/style-defaults-iframe.html |
diff --git a/LayoutTests/fullscreen/rendering/style-defaults-iframe.html b/LayoutTests/fullscreen/rendering/style-defaults-iframe.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..60f3fff77bdef42a0b3c04e2b71b2e3913d8bb64 |
--- /dev/null |
+++ b/LayoutTests/fullscreen/rendering/style-defaults-iframe.html |
@@ -0,0 +1,56 @@ |
+<!DOCTYPE html> |
+<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
|
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script src="../trusted-event.js"></script> |
+<style> |
+iframe { |
+ /* Try to override everything which is !important in the UA style sheet. */ |
+ position: relative !important; |
+ top: auto !important; |
+ right: auto !important; |
+ bottom: auto !important; |
+ left: auto !important; |
+ margin: 10px !important; |
+ box-sizing: content-box !important; |
+ min-width: 50% !important; |
+ max-width: 50% !important; |
+ min-height: 50% !important; |
+ max-height: 50% !important; |
+ object-fit: none !important; |
+ border: 1px solid black; /* not !important in the UA style sheet */ |
+} |
+</style> |
+<div id="log"></div> |
+<iframe></iframe> |
+<script> |
+async_test(function() |
+{ |
+ var iframe = document.querySelector("iframe"); |
+ |
+ document.addEventListener("fullscreenchange", this.step_func_done(function() |
+ { |
+ var style = getComputedStyle(iframe); |
+ // All properties except border should match the UA style sheet. |
+ assert_equals(style.position, "fixed"); |
+ assert_equals(style.top, "0px"); |
+ assert_equals(style.right, "0px"); |
+ assert_equals(style.bottom, "0px"); |
+ assert_equals(style.left, "0px"); |
+ assert_equals(style.margin, "0px"); |
+ assert_equals(style.boxSizing, "border-box"); |
+ assert_equals(style.minWidth, "0px"); |
+ assert_equals(style.maxWidth, "none"); |
+ assert_equals(style.minHeight, "0px"); |
+ assert_equals(style.maxHeight, "none"); |
+ assert_equals(style.width, window.innerWidth + "px"); |
+ 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
|
+ assert_equals(style.objectFit, "contain"); |
+ 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.
|
+ 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.
|
+ assert_equals(style.borderStyle, "solid"); |
+ })); |
+ |
+ trusted_request(iframe); |
+}); |
+</script> |