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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/conformance-requirements/2d.voidreturn.html

Issue 2547023002: Import wpt@3c8896ae408c8fd594979da7c99970029e7856a7 (Closed)
Patch Set: Modify TestExpectations or download new baselines for tests. 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.voidreturn</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.voidreturn</h1>
9 <p class="desc">void methods return undefined</p>
10
11
12 <script>
13 var t = async_test("void methods return undefined");
14 t.step(function() {
15
16 var offscreenCanvas = new OffscreenCanvas(100, 50);
17 var ctx = offscreenCanvas.getContext('2d');
18
19 _assertSame(ctx.save(), undefined, "ctx.save()", "undefined");
20 _assertSame(ctx.restore(), undefined, "ctx.restore()", "undefined");
21 _assertSame(ctx.scale(1, 1), undefined, "ctx.scale(1, 1)", "undefined");
22 _assertSame(ctx.rotate(0), undefined, "ctx.rotate(0)", "undefined");
23 _assertSame(ctx.translate(0, 0), undefined, "ctx.translate(0, 0)", "undefined");
24 if (ctx.transform) { // (avoid spurious failures, since the aim here is not to t est that all features are supported)
25 _assertSame(ctx.transform(1, 0, 0, 1, 0, 0), undefined, "ctx.transform(1, 0, 0, 1, 0, 0)", "undefined");
26 }
27 if (ctx.setTransform) {
28 _assertSame(ctx.setTransform(1, 0, 0, 1, 0, 0), undefined, "ctx.setTransform (1, 0, 0, 1, 0, 0)", "undefined");
29 }
30 _assertSame(ctx.clearRect(0, 0, 0, 0), undefined, "ctx.clearRect(0, 0, 0, 0)", " undefined");
31 _assertSame(ctx.fillRect(0, 0, 0, 0), undefined, "ctx.fillRect(0, 0, 0, 0)", "un defined");
32 _assertSame(ctx.strokeRect(0, 0, 0, 0), undefined, "ctx.strokeRect(0, 0, 0, 0)", "undefined");
33 _assertSame(ctx.beginPath(), undefined, "ctx.beginPath()", "undefined");
34 _assertSame(ctx.closePath(), undefined, "ctx.closePath()", "undefined");
35 _assertSame(ctx.moveTo(0, 0), undefined, "ctx.moveTo(0, 0)", "undefined");
36 _assertSame(ctx.lineTo(0, 0), undefined, "ctx.lineTo(0, 0)", "undefined");
37 _assertSame(ctx.quadraticCurveTo(0, 0, 0, 0), undefined, "ctx.quadraticCurveTo(0 , 0, 0, 0)", "undefined");
38 _assertSame(ctx.bezierCurveTo(0, 0, 0, 0, 0, 0), undefined, "ctx.bezierCurveTo(0 , 0, 0, 0, 0, 0)", "undefined");
39 _assertSame(ctx.arcTo(0, 0, 0, 0, 1), undefined, "ctx.arcTo(0, 0, 0, 0, 1)", "un defined");
40 _assertSame(ctx.rect(0, 0, 0, 0), undefined, "ctx.rect(0, 0, 0, 0)", "undefined" );
41 _assertSame(ctx.arc(0, 0, 1, 0, 0, true), undefined, "ctx.arc(0, 0, 1, 0, 0, tru e)", "undefined");
42 _assertSame(ctx.fill(), undefined, "ctx.fill()", "undefined");
43 _assertSame(ctx.stroke(), undefined, "ctx.stroke()", "undefined");
44 _assertSame(ctx.clip(), undefined, "ctx.clip()", "undefined");
45 if (ctx.putImageData) {
46 _assertSame(ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0), undefined, "ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0)", "undefined");
47 }
48 _assertSame(ctx.drawImage(offscreenCanvas, 0, 0, 1, 1, 0, 0, 0, 0), undefined, " ctx.drawImage(offscreenCanvas, 0, 0, 1, 1, 0, 0, 0, 0)", "undefined");
49 _assertSame(ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white'), undef ined, "ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white')", "undefine d");
50
51 t.done();
52
53 });
54 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698