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

Unified Diff: LayoutTests/svg/filters/feColorMatrix-setAttribute-crash1.html

Issue 1087283002: Rework the checks for too-few values in feColorMatrix filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review comments and tests! Created 5 years, 8 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: LayoutTests/svg/filters/feColorMatrix-setAttribute-crash1.html
diff --git a/LayoutTests/svg/filters/feColorMatrix-setAttribute-crash1.html b/LayoutTests/svg/filters/feColorMatrix-setAttribute-crash1.html
new file mode 100644
index 0000000000000000000000000000000000000000..af5b6b7ee1d59a5fde218f2a6e432dc12329441a
--- /dev/null
+++ b/LayoutTests/svg/filters/feColorMatrix-setAttribute-crash1.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script>
+ function testDone() {
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.notifyDone();
+ }
+ }
+
+ function changeValues() {
+ document.getElementById('color').setAttribute('values', '1');
+ if (window.testRunner) {
+ testRunner.displayAsyncThen(testDone);
+ }
+ }
+
+ onload = function() {
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.displayAsyncThen(changeValues);
+ } else {
+ setTimeout(changeValues, 200);
pdr. 2015/04/16 18:54:53 setTimeout 200ms? Can this be requestAnimationFram
Stephen Chennney 2015/04/16 19:14:13 Done.
+ }
+ }
+ </script>
+</head>
+<body>
+ <svg id="svg" xmlns="http://www.w3.org/2000/svg" width="100" height="100" filter="url(#MyFilter)" version="1.1">
+ <defs>
+ <filter id="MyFilter">
+ <fecolormatrix id="color" type="matrix"></fecolormatrix>
+ </filter>
+ </defs>
+ </svg>
+ PASS
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698