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

Side by Side Diff: LayoutTests/svg/dom/SVGPathSegList-xml-dom-synchronization.xhtml

Issue 262963003: Output repaint rects for svg repaint tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 <html xmlns="http://www.w3.org/1999/xhtml"> 1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head> 2 <head>
3 <script>window.enablePixelTesting = true;</script> 3 <script>window.enablePixelTesting = true;</script>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> 5 <script src="../../fast/repaint/resources/text-based-repaint.js"></script>
6 <script type="text/javascript"> 6 <script type="text/javascript">
7 window.outputRepaintRects = false;
7 function repaintTest() { 8 function repaintTest() {
8 window.jsTestIsAsync = true; 9 window.jsTestIsAsync = true;
9 if (window.testRunner) 10 if (window.testRunner)
10 testRunner.waitUntilDone(); 11 testRunner.waitUntilDone();
11 12
12 path = document.getElementById("path"); 13 path = document.getElementById("path");
13 shouldBe("path.pathSegList.numberOfItems", "3"); 14 shouldBe("path.pathSegList.numberOfItems", "3");
14 15
15 // Check initial 'd' attribute value. 16 // Check initial 'd' attribute value.
16 shouldBeEqualToString("path.getAttribute('d').formatDAttribute()", "M 20 0 0 L 100 0 L 100 100"); 17 shouldBeEqualToString("path.getAttribute('d').formatDAttribute()", "M 20 0 0 L 100 0 L 100 100");
(...skipping 29 matching lines...) Expand all
46 String.prototype.formatDAttribute = function() { 47 String.prototype.formatDAttribute = function() {
47 return this.replace(/,/g, " ") // Remove Firefox commas 48 return this.replace(/,/g, " ") // Remove Firefox commas
48 .replace(/([A-Z])/g, " $1 ") // "M 100 0L 50 0" -> " M 100 0 L 50 0" 49 .replace(/([A-Z])/g, " $1 ") // "M 100 0L 50 0" -> " M 100 0 L 50 0"
49 .replace(/^\s/, "") // " M 100 0" -> "M 100 0" 50 .replace(/^\s/, "") // " M 100 0" -> "M 100 0"
50 .replace(/\s\s/g, " "); // If there was already whitespa ce between coordinates & commands, fix it up again. 51 .replace(/\s\s/g, " "); // If there was already whitespa ce between coordinates & commands, fix it up again.
51 } 52 }
52 ]]> 53 ]]>
53 </script> 54 </script>
54 </body> 55 </body>
55 </html> 56 </html>
OLDNEW
« no previous file with comments | « LayoutTests/svg/custom/use-instanceRoot-event-listeners.xhtml ('k') | LayoutTests/svg/in-html/overflow-repaint.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698