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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-frameless-document-text.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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-frameless-document-text-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/canvas/canvas-frameless-document-text.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-frameless-document-text.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-frameless-document-text.html
index c18bd501fd0d1bf9986ba7d81bda0dfd5514da37..cdecc0fe688719603dd96d2d42816b64767d0858 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-frameless-document-text.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-frameless-document-text.html
@@ -1,9 +1,28 @@
-<!DOCTYPE HTML>
-<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-frameless-document-text.js"></script>
+<script>
+test(function(t) {
+
+ // It is not clear from the spec whether this is supposed to work and how.
+ // Therefore, we do not validate the rendering results. We just make sure
+ // this does not crash the browser.
+ var canvas1 = document.createElement('canvas');
+ var ctx1 = canvas1.getContext('2d');
+ var htmlDoc = document.implementation.createHTMLDocument('', '', null);
+ htmlDoc.adoptNode(canvas1);
+ var canvas2 = htmlDoc.createElement('canvas');
+ var ctx2 = canvas2.getContext('2d');
+
+ ctx1.font = 'italic 30px Arial';
+ ctx2.font = 'italic 30px Arial';
+ ctx1.fillText('Text1', 0, 30);
+ ctx2.fillText('Text1', 0, 30);
+ ctx1.strokeText('Text2', 0, 60);
+ ctx2.strokeText('Text2', 0, 60);
+ ctx1.measureText('Text3');
+ ctx2.measureText('Text3');
+
+}, "This verifies that the browser does not crash when drawing text to a canvas in a frame-less document.");
+</script>
</body>
-</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-frameless-document-text-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698