chromium/third_party/blink/web_tests/external/wpt/html/canvas/offscreen/canvas-context/2d.canvas.context.type.prototype.html

<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.canvas.context.type.prototype</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>

<h1>2d.canvas.context.type.prototype</h1>
<p class="desc">window.CanvasRenderingContext2D.prototype are not [[Writable]] and not [[Configurable]], and its methods are [[Configurable]].</p>

<p class="notes">Defined in "Web IDL" (draft)
<script>
var t = async_test("window.CanvasRenderingContext2D.prototype are not [[Writable]] and not [[Configurable]], and its methods are [[Configurable]].");
var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
    throw reason;
});
t.step(function() {

  var canvas = new OffscreenCanvas(100, 50);
  var ctx = canvas.getContext('2d');

  _assert(window.OffscreenCanvasRenderingContext2D.prototype, "window.OffscreenCanvasRenderingContext2D.prototype");
  _assert(window.OffscreenCanvasRenderingContext2D.prototype.fill, "window.OffscreenCanvasRenderingContext2D.prototype.fill");
  window.OffscreenCanvasRenderingContext2D.prototype = null;
  _assert(window.OffscreenCanvasRenderingContext2D.prototype, "window.OffscreenCanvasRenderingContext2D.prototype");
  delete window.OffscreenCanvasRenderingContext2D.prototype;
  _assert(window.OffscreenCanvasRenderingContext2D.prototype, "window.OffscreenCanvasRenderingContext2D.prototype");
  window.OffscreenCanvasRenderingContext2D.prototype.fill = 1;
  _assertSame(window.OffscreenCanvasRenderingContext2D.prototype.fill, 1, "window.OffscreenCanvasRenderingContext2D.prototype.fill", "1");
  delete window.OffscreenCanvasRenderingContext2D.prototype.fill;
  _assertSame(window.OffscreenCanvasRenderingContext2D.prototype.fill, undefined, "window.OffscreenCanvasRenderingContext2D.prototype.fill", "undefined");
  t.done();

});
</script>