Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: LayoutTests/fullscreen/rendering/ua-style-override.html

Issue 974783002: Match the Fullscreen spec's CSS as far as currently practical (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: disambiguate Fullscreen UA style sheet Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Fullscreen UA style sheet cannot be overriden by author style</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../trusted-event.js"></script>
6 <style>
7 #test {
8 /* Override everything which is !important in the Fullscreen 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 width: 50% !important;
21 height: 50% !important;
22 object-fit: none !important;
23 transform: translate(0, 0) !important;
24 }
25 </style>
26 <div id="log"></div>
27 <div id="test"></div>
28 <script>
29 async_test(function()
30 {
31 var div = document.getElementById("test");
32
33 // Sanity-check that the overriden style initially applies.
34 assert_equals(getComputedStyle(div).position, "relative");
35
36 document.addEventListener("fullscreenchange", this.step_func_done(function()
37 {
38 var style = getComputedStyle(div);
39 // All properties should now match the Fullscreen UA style sheet.
40 assert_equals(style.position, "fixed");
41 assert_equals(style.top, "0px");
42 assert_equals(style.right, "0px");
43 assert_equals(style.bottom, "0px");
44 assert_equals(style.left, "0px");
45 assert_equals(style.margin, "0px");
46 assert_equals(style.boxSizing, "border-box");
47 assert_equals(style.minWidth, "0px");
48 assert_equals(style.maxWidth, "none");
49 assert_equals(style.minHeight, "0px");
50 assert_equals(style.maxHeight, "none");
51 assert_equals(style.width, window.innerWidth + "px");
52 assert_equals(style.height, window.innerHeight + "px");
53 assert_equals(style.objectFit, "contain");
54 assert_equals(style.transform, "none");
55 }));
56
57 trusted_request(div);
58 });
59 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fullscreen/rendering/ua-style-iframe-border.html ('k') | LayoutTests/fullscreen/rendering/ua-style-root.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698