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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-save-restore.js

Issue 2696023002: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Rebaseline Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-save-restore.js
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-save-restore.js b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-save-restore.js
deleted file mode 100644
index cd68a5a9b9f6c30188b29caf3e94f587669039b1..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-save-restore.js
+++ /dev/null
@@ -1,161 +0,0 @@
-description("Test of save and restore on canvas graphics context.");
-
-var canvas = document.createElement("canvas");
-var context = canvas.getContext('2d');
-
-function hex(number)
-{
- var hexDigits = "0123456789abcdef";
- return hexDigits[number >> 4] + hexDigits[number & 0xF];
-}
-
-function pixel()
-{
- var imageData = context.getImageData(0, 0, 1, 1);
- return "#" + hex(imageData.data[0]) + hex(imageData.data[1]) + hex(imageData.data[2]);
-}
-
-var black="#000000";
-var red = "#ff0000";
-var green = "#008000";
-
-// (save set restore)
-context.fillStyle = "black";
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-
-context.save();
-context.fillStyle = "red";
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "red");
-
-context.restore();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-
-
-// (save (save set restore) restore)
-context.fillStyle = "black";
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-
-context.save();
-
-context.save();
-context.fillStyle = "red";
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "red");
-
-context.restore();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-
-context.restore();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-
-
-// (save (save restore) set restore)
-context.fillStyle = "black";
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-
-context.save();
-context.restore();
-
-context.save();
-context.fillStyle = "red";
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "red");
-
-context.restore();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-
-
-// (save (save (save set restore) set (save set restore) restore) restore)
-context.fillStyle = "black";
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-
-context.save();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-
-context.save();
-context.fillStyle = "red";
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "red");
-
-context.restore();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-
-context.fillStyle = "green";
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "green");
-
-context.save();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "green");
-
-context.fillStyle = "red";
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "red");
-
-context.restore();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "green");
-
-context.restore();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-
-context.restore();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-
-
-// (save (save set (save (save set restore) restore) set restore) restore)
-context.fillStyle = "black";
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-
-context.save();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-
-context.save();
-context.fillStyle = "red";
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "red");
-
-context.save();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "red");
-
-context.save();
-context.fillStyle = "green";
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "green");
-
-context.restore();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "red");
-
-context.restore();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "red");
-
-context.fillStyle = "green";
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "green");
-
-context.restore();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-
-context.restore();
-context.fillRect(0, 0, 1, 1);
-shouldBe("pixel()", "black");
-

Powered by Google App Engine
This is Rietveld 408576698