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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-invalid-strokestyle.html

Issue 2679083003: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Removing remained expected.txt files 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/canvas-invalid-strokestyle.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-invalid-strokestyle.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-invalid-strokestyle.html
index 1b97f7896f03be609c9563491a0fff8c73a8d332..0623dd9b1de7ff1101dec93a8bbd58b458548606 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-invalid-strokestyle.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-invalid-strokestyle.html
@@ -1,10 +1,21 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../resources/js-test.js"></script>
-</head>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
<body>
<canvas id="canvas" width="200" height="200"></canvas>
-<script src="canvas-invalid-strokestyle.js"></script>
+<script>
+test(function(t) {
+ var ctx = document.getElementById('canvas').getContext('2d');
+ ctx.strokeStyle = 'rgb(0, 255, 0)';
+ ctx.strokeStyle = 'nonsense';
+ ctx.lineWidth = 200;
+ ctx.moveTo(0,100);
+ ctx.lineTo(200,100);
+ ctx.stroke();
+ var imageData = ctx.getImageData(0, 0, 200, 200);
+ var imgdata = imageData.data;
+ assert_equals(imgdata[4], 0);
+ assert_equals(imgdata[5], 255);
+ assert_equals(imgdata[6], 0);
+}, 'Series of tests to ensure correct behaviour on an invalid strokeStyle()');
Justin Novosad 2017/02/16 15:34:30 Not a series
zakerinasab 2017/02/16 17:48:12 Acknowledged.
+</script>
</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698