| Index: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen.html b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..36ba020363fc99fa734b309e3289ba04a3d5b0df
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen.html
|
| @@ -0,0 +1,33 @@
|
| +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
| +<html>
|
| +<head>
|
| +<script src="../../resources/js-test.js"></script>
|
| +</head>
|
| +<body>
|
| +<script>
|
| +
|
| +description("Test transferControlToOffscreen.");
|
| +window.jsTestIsAsync = true;
|
| +
|
| +var width = 50;
|
| +var height = 50;
|
| +var canvas = document.createElement("canvas");
|
| +canvas.width = width;
|
| +canvas.height = height;
|
| +
|
| +var offscreenCanvas = canvas.transferControlToOffscreen();
|
| +shouldBe("offscreenCanvas.width", "width");
|
| +shouldBe("offscreenCanvas.height", "height");
|
| +
|
| +var ctx = canvas.getContext("2d");
|
| +try {
|
| + offscreenCanvas = canvas.transferControlToOffscreen();
|
| + testFailed("transferControlToOffscreen from a canvas with context didn't throw an exception.");
|
| +} catch (ex) {
|
| + testPassed("transferControlToOffscreen from a canvas with context throws an exception: " + ex);
|
| +}
|
| +
|
| +finishJSTest();
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|