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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/draw-focus-if-needed-invisible-crash.html

Issue 2700823002: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Addressing comments 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/draw-focus-if-needed-invisible-crash.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/draw-focus-if-needed-invisible-crash.html b/third_party/WebKit/LayoutTests/fast/canvas/draw-focus-if-needed-invisible-crash.html
index 314268f6376fb61554aea63846ad36bb26a0e858..87f23621d23e3812d51a3b62548352aa9ff5b10b 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/draw-focus-if-needed-invisible-crash.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/draw-focus-if-needed-invisible-crash.html
@@ -1,17 +1,20 @@
-<!DOCTYPE HTML>
-<p>This test passes by not crashing.</p>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+
<canvas id="canvas">
<button id="button"></button>
</canvas>
+
<script>
-if (window.testRunner)
- testRunner.dumpAsText();
+test(function(t) {
-var button = document.getElementById("button");
-button.focus();
-var canvas = document.getElementById("canvas")
-var ctx = canvas.getContext("2d");
-ctx.rect(0, 0, 10, 10);
-canvas.style.display = "none";
-ctx.drawFocusIfNeeded(button);
-</script>
+ var button = document.getElementById("button");
+ button.focus();
+ var canvas = document.getElementById("canvas")
+ var ctx = canvas.getContext("2d");
+ ctx.rect(0, 0, 10, 10);
+ canvas.style.display = "none";
+ ctx.drawFocusIfNeeded(button);
+
+}, 'Test that drawFocusIfNeeded does not crash.');
+</script>

Powered by Google App Engine
This is Rietveld 408576698