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

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

Issue 2674933002: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Corrections 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-getContext-invalid.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-getContext-invalid.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-getContext-invalid.html
index 088055d451b9fdaee3689dcb569dfed2636a97bf..cf7aad2fa3f45984640bdc7b2e06322d018f8986 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-getContext-invalid.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-getContext-invalid.html
@@ -1,9 +1,20 @@
-<!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>
-<script src="script-tests/canvas-getContext-invalid.js"></script>
+<script>
+test(function(t) {
+ canvas = document.createElement('canvas');
+
+ assert_equals(canvas.getContext(''), null);
+ assert_equals(canvas.getContext('2d#'), null);
+ assert_equals(canvas.getContext('This is clearly not a valid context name.'), null);
+ assert_equals(canvas.getContext('2d\0'), null);
+ assert_equals(canvas.getContext('2\uFF44'), null);
+ assert_equals(canvas.getContext('2D'), null);
+ assert_throws(null, function() {canvas.getContext();});
+ assert_equals(canvas.getContext('null'), null);
+ assert_equals(canvas.getContext('undefined'), null);
+
+}, "Test that invalid canvas getContext() requests return null.");
+</script>
</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698