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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/custom/pattern-empty-bbox-2.html

Issue 2295653002: Use window.testRunner in if-clause (Closed)
Patch Set: a Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/run-after-layout-and-paint.js"></script> 2 <script src="../../resources/run-after-layout-and-paint.js"></script>
3 <svg width="100" height="100"> 3 <svg width="100" height="100">
4 <pattern id="p" patternUnits="objectBoundingBox" width="100" height="100"> 4 <pattern id="p" patternUnits="objectBoundingBox" width="100" height="100">
5 <rect width="100" height="100" fill="green"/> 5 <rect width="100" height="100" fill="green"/>
6 </pattern> 6 </pattern>
7 <line y1="50" x2="100" y2="50" stroke-width="100" stroke="url(#p) red"/> 7 <line y1="50" x2="100" y2="50" stroke-width="100" stroke="url(#p) red"/>
8 </svg> 8 </svg>
9 <script> 9 <script>
10 function changeToUSOU() { 10 function changeToUSOU() {
11 document.querySelector('pattern').setAttribute('patternUnits', 'userSpaceOnUse '); 11 document.querySelector('pattern').setAttribute('patternUnits', 'userSpaceOnUse ');
12 } 12 }
13 13
14 if (window.testRunner) 14 if (window.testRunner)
15 testRunner.waitUntilDone(); 15 testRunner.waitUntilDone();
16 16
17 window.onload = function() { 17 window.onload = function() {
18 runAfterLayoutAndPaint(function() { 18 runAfterLayoutAndPaint(function() {
19 changeToUSOU(); 19 changeToUSOU();
20 if (testRunner) 20 if (window.testRunner)
21 runAfterLayoutAndPaint(function() { testRunner.notifyDone(); }); 21 runAfterLayoutAndPaint(function() { testRunner.notifyDone(); });
22 }); 22 });
23 }; 23 };
24 </script> 24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698