tor-browser

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

exception-thrown-bad-color.tentative.html (865B)


      1 <!DOCTYPE html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <script src="/resources/testdriver.js"></script>
      5 <script src="/resources/testdriver-actions.js"></script>
      6 <script src="/resources/testdriver-vendor.js"></script>
      7 
      8 <canvas id="canvas"></canvas>
      9 <script>
     10  promise_test(async (t) => {
     11    const presenter = await navigator.ink.requestPresenter({presentationArea: canvas});
     12    const style = { color: "bad-color", diameter: 6 };
     13 
     14    canvas.addEventListener("pointermove", evt => {
     15      assert_throws_js(TypeError, function() {
     16        presenter.updateInkTrailStartPoint(evt, style);
     17      }, "Expected a TypeError to be thrown due to bad color.");
     18    });
     19 
     20    const actions_promise = new test_driver.Actions().pointerMove(10,10).send();
     21    t.add_cleanup(() => actions_promise);
     22  });
     23 </script>