tor-browser

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

input-whitespace.html (1212B)


      1 <!DOCTYPE html>
      2 <meta charset=utf-8>
      3  <head>
      4    <title>Chrome whitespace bug</title>
      5    <link rel="author" title="Steinar H. Gunderson" href="mailto:sesse@chromium.org">
      6    <link rel="help" href="https://crbug.com/1309014">
      7    <script src="/resources/testharness.js"></script>
      8    <script src="/resources/testharnessreport.js"></script>
      9    <script src="/resources/testdriver.js"></script>
     10    <script src="/resources/testdriver-vendor.js"></script>
     11    <style>
     12      [data-foo] { color: red; }
     13      div input { color: inherit; }
     14    </style>
     15  </head>
     16  <body>
     17    <div id="container" data-foo="foo"><input id="input1"></input></div>
     18    <script>
     19      async_test(t => {
     20        let container = document.getElementById('container');
     21        let input = document.getElementById('input1');
     22        input.onkeypress = function(e) {
     23          container.removeAttribute('data-foo');
     24          input.style.display = 'block';
     25        };
     26        test_driver.send_keys(input, "a b")
     27          .then(t.step_func(() => {
     28             assert_equals(input.value, "a b");
     29             t.done();
     30          }));
     31      }, "whitespace should not be eaten after parent style recalculation");
     32    </script>
     33  </body>
     34 </html>