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

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

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 // DO NOT EDIT! This test has been generated by tools/gentest.py.
2 // OffscreenCanvas test in a worker:2d.voidreturn
3 // Description:void methods return undefined
4 // Note:
5
6 importScripts("/resources/testharness.js");
7 importScripts("/common/canvas-tests.js");
8
9 var t = async_test("void methods return undefined");
10 t.step(function() {
11
12 var offscreenCanvas = new OffscreenCanvas(100, 50);
13 var ctx = offscreenCanvas.getContext('2d');
14
15 _assertSame(ctx.save(), undefined, "ctx.save()", "undefined");
16 _assertSame(ctx.restore(), undefined, "ctx.restore()", "undefined");
17 _assertSame(ctx.scale(1, 1), undefined, "ctx.scale(1, 1)", "undefined");
18 _assertSame(ctx.rotate(0), undefined, "ctx.rotate(0)", "undefined");
19 _assertSame(ctx.translate(0, 0), undefined, "ctx.translate(0, 0)", "undefined");
20 if (ctx.transform) { // (avoid spurious failures, since the aim here is not to t est that all features are supported)
21 _assertSame(ctx.transform(1, 0, 0, 1, 0, 0), undefined, "ctx.transform(1, 0, 0, 1, 0, 0)", "undefined");
22 }
23 if (ctx.setTransform) {
24 _assertSame(ctx.setTransform(1, 0, 0, 1, 0, 0), undefined, "ctx.setTransform (1, 0, 0, 1, 0, 0)", "undefined");
25 }
26 _assertSame(ctx.clearRect(0, 0, 0, 0), undefined, "ctx.clearRect(0, 0, 0, 0)", " undefined");
27 _assertSame(ctx.fillRect(0, 0, 0, 0), undefined, "ctx.fillRect(0, 0, 0, 0)", "un defined");
28 _assertSame(ctx.strokeRect(0, 0, 0, 0), undefined, "ctx.strokeRect(0, 0, 0, 0)", "undefined");
29 _assertSame(ctx.beginPath(), undefined, "ctx.beginPath()", "undefined");
30 _assertSame(ctx.closePath(), undefined, "ctx.closePath()", "undefined");
31 _assertSame(ctx.moveTo(0, 0), undefined, "ctx.moveTo(0, 0)", "undefined");
32 _assertSame(ctx.lineTo(0, 0), undefined, "ctx.lineTo(0, 0)", "undefined");
33 _assertSame(ctx.quadraticCurveTo(0, 0, 0, 0), undefined, "ctx.quadraticCurveTo(0 , 0, 0, 0)", "undefined");
34 _assertSame(ctx.bezierCurveTo(0, 0, 0, 0, 0, 0), undefined, "ctx.bezierCurveTo(0 , 0, 0, 0, 0, 0)", "undefined");
35 _assertSame(ctx.arcTo(0, 0, 0, 0, 1), undefined, "ctx.arcTo(0, 0, 0, 0, 1)", "un defined");
36 _assertSame(ctx.rect(0, 0, 0, 0), undefined, "ctx.rect(0, 0, 0, 0)", "undefined" );
37 _assertSame(ctx.arc(0, 0, 1, 0, 0, true), undefined, "ctx.arc(0, 0, 1, 0, 0, tru e)", "undefined");
38 _assertSame(ctx.fill(), undefined, "ctx.fill()", "undefined");
39 _assertSame(ctx.stroke(), undefined, "ctx.stroke()", "undefined");
40 _assertSame(ctx.clip(), undefined, "ctx.clip()", "undefined");
41 if (ctx.putImageData) {
42 _assertSame(ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0), undefined, "ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0)", "undefined");
43 }
44 _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");
45 _assertSame(ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white'), undef ined, "ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white')", "undefine d");
46
47 t.done();
48
49 });
50 done();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698