summaryrefslogtreecommitdiffstats
path: root/dom/canvas/test/test_createPattern_broken.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /dom/canvas/test/test_createPattern_broken.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/canvas/test/test_createPattern_broken.html')
-rw-r--r--dom/canvas/test/test_createPattern_broken.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/dom/canvas/test/test_createPattern_broken.html b/dom/canvas/test/test_createPattern_broken.html
new file mode 100644
index 000000000..b4d66dc9e
--- /dev/null
+++ b/dom/canvas/test/test_createPattern_broken.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>Test for createPattern with a broken image</title>
+ <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+ <script type="application/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
+ <script type="application/javascript" src="file_drawWindow_common.js"></script>
+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+ <script type="application/javascript">
+
+ SimpleTest.waitForExplicitFinish();
+ window.addEventListener("load", function(){
+ var _thrown = undefined;
+
+ try{
+ var img = document.getElementById('broken.png');
+ var ctx = document.getElementById('c').getContext('2d');
+ var p = ctx.createPattern(img, 'repeat');
+ } catch (e) {
+ _thrown = e
+ };
+
+ ok(_thrown && _thrown.name == "InvalidStateError" && _thrown.code == DOMException.INVALID_STATE_ERR, "should throw InvalidStateError");
+
+ SimpleTest.finish();
+ });
+
+ </script>
+</head>
+<body>
+<canvas id="c" class="output" width="100" height="50"></canvas>
+<img src="/images/broken.png" id="broken.png" class="resource"/>
+</body>
+</html>