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

Unified Diff: LayoutTests/fast/canvas/draw-system-focus-ring.html

Issue 203293005: Fix crash in 2D canvas drawSystemFocusRing with invalid argument. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | LayoutTests/fast/canvas/draw-system-focus-ring-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/canvas/draw-system-focus-ring.html
diff --git a/LayoutTests/fast/canvas/draw-system-focus-ring.html b/LayoutTests/fast/canvas/draw-system-focus-ring.html
index 4e9fb40c3d75d11dd472a7b97feae5a27c6f4ed5..5204f5c336ebf3ebe08eaae184918a919b8bb29b 100644
--- a/LayoutTests/fast/canvas/draw-system-focus-ring.html
+++ b/LayoutTests/fast/canvas/draw-system-focus-ring.html
@@ -15,10 +15,16 @@ if (window.testRunner)
document.getElementById("button1").focus();
var canvas = document.getElementById("canvas").getContext("2d");
+
+shouldNotThrow('canvas.drawSystemFocusRing(null);');
+shouldThrow('canvas.drawSystemFocusRing();');
+
canvas.beginPath();
canvas.rect(50, 50, 200, 100);
canvas.fillStyle = "#ccf";
canvas.fill();
+// re-test null case after having defined a path (regression test for crbug.com/353248)
+shouldNotThrow('canvas.drawSystemFocusRing(null);');
canvas.drawSystemFocusRing(document.getElementById("button1"));
canvas.beginPath();
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/draw-system-focus-ring-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698