tor-browser

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

resize-015.html (1912B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Basic User Interface Test: resizing uses the style attribute</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      assert_regexp_match(test.style.width, /px$/, "The width property of the style attribute should be set in pixels");
     43      assert_not_equals(test.style.width, "100px", "The width should be different from the initial one");
     44      assert_regexp_match(test.style.height, /px$/, "The height property of the style attribute should be set in pixels");
     45      assert_not_equals(test.style.height, "100px", "The height should be different from the initial one");
     46    }, "resize works by setting the width and height properties on the style attrbute in pixels");
     47  test(
     48    function(){
     49      var test = document.getElementById("test");
     50      assert_false(test.getAttribute("style").includes("important"));
     51    }, "resize does not set !important");
     52  done();
     53 }
     54 </script>