Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: LayoutTests/canvas/philip/tests/2d.imageData.create2.nonfinite.html

Issue 259773008: Add support for type checking of floating point arguments as [TypeChecking=Unrestricted] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove outdated test Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Canvas test: 2d.imageData.create2.nonfinite</title>
3 <script src="../tests.js"></script>
4 <link rel="stylesheet" href="../tests.css">
5 <body>
6 <p id="passtext">Pass</p>
7 <p id="failtext">Fail</p>
8 <p class="output">These images should be identical:</p>
9 <canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL ( fallback content)</p></canvas>
10
11 <ul id="d"></ul>
12 <script>
13 _addTest(function(canvas, ctx) {
14
15 try { var _thrown = false;
16 ctx.createImageData(Infinity, 10);
17 } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assert ion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED _ERR: ctx.createImageData(Infinity, 10)"); }
18 try { var _thrown = false;
19 ctx.createImageData(-Infinity, 10);
20 } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assert ion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED _ERR: ctx.createImageData(-Infinity, 10)"); }
21 try { var _thrown = false;
22 ctx.createImageData(NaN, 10);
23 } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assert ion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED _ERR: ctx.createImageData(NaN, 10)"); }
24 try { var _thrown = false;
25 ctx.createImageData(10, Infinity);
26 } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assert ion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED _ERR: ctx.createImageData(10, Infinity)"); }
27 try { var _thrown = false;
28 ctx.createImageData(10, -Infinity);
29 } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assert ion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED _ERR: ctx.createImageData(10, -Infinity)"); }
30 try { var _thrown = false;
31 ctx.createImageData(10, NaN);
32 } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assert ion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED _ERR: ctx.createImageData(10, NaN)"); }
33 try { var _thrown = false;
34 ctx.createImageData(Infinity, Infinity);
35 } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assert ion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED _ERR: ctx.createImageData(Infinity, Infinity)"); }
36
37
38 });
39 </script>
40
OLDNEW
« no previous file with comments | « LayoutTests/canvas/philip/README ('k') | LayoutTests/canvas/philip/tests/2d.imageData.create2.nonfinite-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698