tor-browser

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

resize-016.html (1400B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Basic User Interface Test: resizing horizontally 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  width: 100px;
     12  height: 100px;
     13  background: orange;
     14  overflow: hidden;
     15  resize: horizontal;
     16 }
     17 </style>
     18 
     19 <p>Attempt to resize the orange box both horizontally and vertically, then press the “done” button
     20 (Resizing vertically is not expected to be possible but should still be attempted).</p>
     21 
     22 <button onclick="verify()">done</button>
     23 
     24 <div id="test"></div>
     25 <div id=log></div>
     26 <script>
     27 setup({ explicit_done: true });
     28 function verify() {
     29  test(
     30    function(){
     31      var test = document.getElementById("test");
     32      assert_regexp_match(test.style.width, /px$/, "The width property of the style attribute should be set in pixels");
     33      assert_not_equals(test.style.width, "100px", "The width should be different from the initial one");
     34      assert_equals(test.style.height, "", "The height property of the style attribute should not be set");
     35    }, "horizontal resizing only affects the width properties on the style attrbute.");
     36  done();
     37 }
     38 </script>