tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

resize-018.html (1876B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Basic User Interface Test: removing the ability to resize keeps the resized dimentions</title>
      4 <link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net">
      5 <link rel="help" href="https://drafts.csswg.org/css-ui-3/#resize">
      6 <meta name="flags" content="interact">
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 <style>
     10 #test {
     11  position: absolute;
     12  width: 100px;
     13  height: 100px;
     14  background: orange;
     15  overflow: hidden;
     16  resize: both;
     17 }
     18 #target {
     19  position: absolute;
     20  width: 150px;
     21  height: 150px;
     22  background: blue;
     23 }
     24 #log { margin-top: 200px; }
     25 </style>
     26 
     27 <p>Enlarge the orange box so that it at least covers the blue box entirely, then press the “done” button.</p>
     28 <!-- There's no actual need to cover the whole box,
     29  but doing so makes sure that the user has resized in both dimensions -->
     30 
     31 <button onclick="verify()">done</button>
     32 
     33 <div id="target"></div>
     34 <div id="test"></div>
     35 <div id=log></div>
     36 <script>
     37 setup({ explicit_done: true });
     38 function verify() {
     39  test(
     40    function(){
     41      var test = document.getElementById("test");
     42      var w = test.style.width;
     43      var h = test.style.height;
     44      assert_regexp_match(w, /px$/, "The width property of the style attribute should be set");
     45      assert_regexp_match(h, /px$/, "The height property of the style attribute should be set");
     46      document.styleSheets[0].cssRules[0].style.resize= "none";
     47      assert_equals(test.style.width, w, "The width property of the style attribute should still be set after removing ability to resize");
     48      assert_equals(test.style.height, h, "The height property of the style attribute should still be set after removing ability to resize");
     49    }, "Removing the ability to resize an element does not reset its size");
     50  done();
     51 }
     52 </script>