Index: LayoutTests/http/tests/inspector/elements-test.js |
diff --git a/LayoutTests/http/tests/inspector/elements-test.js b/LayoutTests/http/tests/inspector/elements-test.js |
index b969a49de0767e9b5c8020b108b176cd7e495b48..33ddf3ccf2a50b4004b8fcb8ff10fa84f25af230 100644 |
--- a/LayoutTests/http/tests/inspector/elements-test.js |
+++ b/LayoutTests/http/tests/inspector/elements-test.js |
@@ -748,3 +748,22 @@ function dumpInspectorHighlightRects() |
output(rectName + " rect is " + rect.width + " x " + rect.height + " at (" + rect.left + ", " + rect.top + ")"); |
} |
} |
+ |
+function dumpInspectorHighlightShape() |
+{ |
+ var shapes = window.internals.inspectorHighlightShape(document); |
+ var parse = JSON.parse(shapes); |
+ var commands = parse.shape; |
+ var text = ""; |
+ for(var commandsIndex = 0; commandsIndex < commands.length;) { |
Bear Travis
2014/04/23 20:46:06
Is this different than just doing text = parse.sha
Habib Virji
2014/04/24 09:53:21
Done.
|
+ var index = commandsIndex; |
+ text += commands[commandsIndex++] + " "; |
+ if (commands[index] != 'Z') |
+ text += commands[commandsIndex++] + " " + commands[commandsIndex++] + " "; |
+ if (commands[index] == 'C') |
+ text += commands[commandsIndex++] + " " + commands[commandsIndex++] + " " + commands[commandsIndex++] + " " + commands[commandsIndex++] + " "; |
+ else if (commands[index] == 'Q') |
+ text += commands[commandsIndex++] + " " + commands[commandsIndex++] + " "; |
+ } |
+ output(text); |
+} |