tor-browser

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

historical.html (2749B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <title>Historical canvas features</title>
      4 <script src=/resources/testharness.js></script>
      5 <script src=/resources/testharnessreport.js></script>
      6 <div id=log></div>
      7 <script>
      8 var canvas, context, path2d;
      9 setup(function() {
     10  canvas = document.createElement("canvas");
     11  context = canvas.getContext('2d');
     12  path2d = new Path2D();
     13 });
     14 function t(member, obj) {
     15  var name = obj === canvas ? "Canvas" : String(obj).match(/\[object (\S+)\]/)[1];
     16  test(function() {
     17    assert_false(member in obj);
     18  }, name + " support for " + member);
     19 }
     20 // added in https://github.com/whatwg/html/commit/0ecbf0e010df16d9c6d11eef6b2c58419158c4da
     21 // renamed in https://github.com/whatwg/html/commit/2542a12cb25ee93534cbed1f31b5e1bc05fcdd0e
     22 t("supportsContext", canvas);
     23 
     24 // removed in https://github.com/whatwg/html/commit/2cfb8e3f03d3166842d2ad0f661459d26e2a40eb
     25 t("probablySupportsContext", canvas);
     26 
     27 // removed in https://github.com/whatwg/html/commit/ef72f55da4acdf266174225c6ca8bf2a650d0219
     28 t("width", context);
     29 t("height", context);
     30 
     31 // removed in https://github.com/whatwg/html/commit/740634d0f30a3b76e9da166ac2fa8835fcc073ab
     32 t("setContext", canvas);
     33 t("transferControlToProxy", canvas);
     34 t("CanvasProxy", window);
     35 t("commit", canvas);
     36 test(function() {
     37  assert_throws_js(TypeError, function() {
     38    new CanvasRenderingContext2D();
     39  }, 'no arguments');
     40  assert_throws_js(TypeError, function() {
     41    new CanvasRenderingContext2D(1, 1);
     42  }, 'with arguments');
     43 }, "CanvasRenderingContext2D constructors");
     44 
     45 // removed in https://github.com/whatwg/html/commit/e1d04f49a38e2254a783c28987457a95a47d9511
     46 t("addPathByStrokingPath", path2d);
     47 t("addText", path2d);
     48 t("addPathByStrokingText", path2d);
     49 
     50 // renamed in https://github.com/whatwg/html/commit/fcb0756dd94d96df9b8355741d82fcd5ca0a6154
     51 test(function() {
     52  var canvas = document.createElement('canvas');
     53  var context = canvas.getContext('bitmaprenderer');
     54  if (context) {
     55    assert_false('transferImageBitmap' in context);
     56  }
     57 }, 'ImageBitmapRenderingContext support for transferImageBitmap');
     58 
     59 // renamed in https://github.com/whatwg/html/commit/3aec2a7e04a3402201afd29c224b57fa54497517
     60 t('Path', window);
     61 
     62 // removed in https://github.com/whatwg/html/commit/d5759b0435091e4858c9bff90319cbe5b040eda2
     63 t('toDataURLHD', canvas);
     64 t('toBlobHD', canvas);
     65 t('createImageDataHD', context);
     66 t('getImageDataHD', context);
     67 t('putImageDataHD', context);
     68 test(function() {
     69  if ('ImageData' in window) {
     70    assert_false('resolution' in new ImageData(1, 1));
     71  }
     72 }, 'ImageData support for resolution');
     73 
     74 // dropped/renamed in https://github.com/whatwg/html/commit/ff07c6d630fb986f6c4f64b2fb87387b4f89647d
     75 t('drawSystemFocusRing', context);
     76 t('drawCustomFocusRing', context);
     77 </script>