tor-browser

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

navigator-window-controls-overlay.tentative.html (1482B)


      1 <!DOCTYPE html>
      2 <meta charset='utf-8'>
      3 <title>navigator.windowControlsOverlay</title>
      4 
      5 <script src='/resources/testharness.js'></script>
      6 <script src='/resources/testharnessreport.js'></script>
      7 
      8 <script>
      9  test(function(){
     10    assert_idl_attribute(navigator, 'windowControlsOverlay');
     11  }, 'the windowControlsOverlay object should exist on the navigator object');
     12 
     13  test(function(){
     14    assert_idl_attribute(navigator.windowControlsOverlay, 'visible');
     15  }, 'visible should be a member of the windowControlsOverlay object');
     16 
     17  test(function(){
     18    assert_false(navigator.windowControlsOverlay.visible);
     19  }, 'visible should be false');
     20 
     21  test(function(){
     22    assert_idl_attribute(navigator.windowControlsOverlay, 'getTitlebarAreaRect');
     23  }, 'getTitlebarAreaRect should be a method of the windowControlsOverlay object');
     24 
     25  test(function(){
     26    var rect = navigator.windowControlsOverlay.getTitlebarAreaRect();
     27    assert_true(rect instanceof DOMRect);
     28  }, 'getTitlebarAreaRect return type should be DOMRect');
     29 
     30  test(function(){
     31    var rect = navigator.windowControlsOverlay.getTitlebarAreaRect();
     32    assert_equals(rect.x, 0);
     33    assert_equals(rect.y, 0);
     34    assert_equals(rect.width, 0);
     35    assert_equals(rect.height, 0);
     36  }, 'getTitlebarAreaRect should return a empty DOMRect');
     37 
     38  test(function(){
     39    assert_idl_attribute(navigator.windowControlsOverlay, 'ongeometrychange');
     40  }, 'ongeometrychange should be a member of the windowControlsOverlay object');
     41 </script>