tor-browser

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

error.html (1150B)


      1 <!doctype html>
      2 <title>img current pixel density error</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <div id=log></div>
      6 <img id=ref src="404" alt="testing">
      7 <img srcset="404" alt="testing">
      8 <img srcset="404 0.5x" alt="testing">
      9 <img srcset="404 2x" alt="testing">
     10 <img srcset="404 100w" alt="testing">
     11 <img srcset="404 100w" sizes="500px" alt="testing">
     12 <picture><img src="404 100w" sizes="500px" alt="testing"></picture>
     13 <script>
     14 setup({explicit_done:true});
     15 onload = function() {
     16  var ref = document.getElementById("ref");
     17  var expected_width = ref.width;
     18  var expected_height = ref.height;
     19  [].forEach.call(document.images, function(img) {
     20    test(function() {
     21      assert_not_equals(expected_width, 0, 'expected_width');
     22      assert_not_equals(expected_height, 0, 'expected_height');
     23      assert_equals(img.width, expected_width, 'width');
     24      assert_equals(img.height, expected_height, 'height');
     25      assert_equals(img.naturalWidth, 0, 'naturalWidth');
     26      assert_equals(img.naturalHeight, 0, 'naturalHeight');
     27    }, img.outerHTML);
     28  });
     29  done();
     30 };
     31 </script>