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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html

Issue 2553473002: Add offscreen-canvas to the list of wpt directories to skip. (Closed)
Patch Set: Created 4 years 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
3 <title>OffscreenCanvas test: 2d.gradient.linear.nonfinite</title>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 <script src="/common/canvas-tests.js"></script>
7
8 <h1>2d.gradient.linear.nonfinite</h1>
9 <p class="desc">createLinearGradient() throws TypeError if arguments are not fin ite</p>
10
11
12 <script>
13 var t = async_test("createLinearGradient() throws TypeError if arguments are not finite");
14 t.step(function() {
15
16 var offscreenCanvas = new OffscreenCanvas(100, 50);
17 var ctx = offscreenCanvas.getContext('2d');
18
19 assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, 0 , 1, 0); });
20 assert_throws(new TypeError(), function() { ctx.createLinearGradient(-Infinity, 0, 1, 0); });
21 assert_throws(new TypeError(), function() { ctx.createLinearGradient(NaN, 0, 1, 0); });
22 assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, Infinity , 1, 0); });
23 assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, -Infinit y, 1, 0); });
24 assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, NaN, 1, 0); });
25 assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, 0, Infin ity, 0); });
26 assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, 0, -Infi nity, 0); });
27 assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, 0, NaN, 0); });
28 assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, 0, 1, In finity); });
29 assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, 0, 1, -I nfinity); });
30 assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, 0, 1, Na N); });
31 assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, I nfinity, 1, 0); });
32 assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, I nfinity, Infinity, 0); });
33 assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, I nfinity, Infinity, Infinity); });
34 assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, I nfinity, 1, Infinity); });
35 assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, 0 , Infinity, 0); });
36 assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, 0 , Infinity, Infinity); });
37 assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, 0 , 1, Infinity); });
38 assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, Infinity , Infinity, 0); });
39 assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, Infinity , Infinity, Infinity); });
40 assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, Infinity , 1, Infinity); });
41 assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, 0, Infin ity, Infinity); });
42
43 t.done();
44
45 });
46 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698