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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-zero-size.html

Issue 2679083003: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Adding virtual/gpu/fast/canvas/canvas-imageSmoothingQuality.html to TestExpectations 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-imageSmoothingEnabled-zero-size.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-zero-size.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-zero-size.html
index af70950adfaa1ae30e2fc4e71f9e1b7902c42602..2f92fd844764991844dc56f7e4cefc4790bc40bf 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-zero-size.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-zero-size.html
@@ -1,20 +1,14 @@
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
-<!doctype html>
-<html>
- <body>
- This test passes by not crashing !
- <script>
- if (window.testRunner) {
- testRunner.dumpAsText();
- }
- window.onload = function () {
- var canvas = document.createElement('canvas');
- canvas.width = 0;
- canvas.height = 0;
- var context = canvas.getContext('2d');
- if(context.imageSmoothingEnabled) {context.imageSmoothingEnabled = false;}
- };
- </script>
- </body>
-</html>
+<script>
+test(function(t) {
+ var canvas = document.createElement('canvas');
+ canvas.width = 0;
+ canvas.height = 0;
+ var context = canvas.getContext('2d');
+ if (context.imageSmoothingEnabled)
+ context.imageSmoothingEnabled = false;
+}, 'Test that canvas.imageSmoothingEnabled does not crash when the size of the canvas is (0,0).');
+</script>

Powered by Google App Engine
This is Rietveld 408576698