| OLD | NEW | 
|---|
| (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> | 
| OLD | NEW | 
|---|