summaryrefslogtreecommitdiffstats
path: root/third_party/webdriver/test_data/svgPiechart.xhtml
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/webdriver/test_data/svgPiechart.xhtml')
-rw-r--r--third_party/webdriver/test_data/svgPiechart.xhtml84
1 files changed, 84 insertions, 0 deletions
diff --git a/third_party/webdriver/test_data/svgPiechart.xhtml b/third_party/webdriver/test_data/svgPiechart.xhtml
new file mode 100644
index 0000000..1bf5188
--- /dev/null
+++ b/third_party/webdriver/test_data/svgPiechart.xhtml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+<head>
+ <title>Pie Chart Test</title>
+</head>
+<body>
+<script type="text/javascript">
+ function markClick(input) {
+ var element = document.getElementById('result');
+ var range = document.createRange();
+ range.selectNodeContents(element);
+ range.deleteContents();
+ element.appendChild(range.createContextualFragment(input));
+ }
+</script>
+ <div id="someText">
+ Some text for the chart.
+ </div>
+ <div id="result">Nothing.</div>
+ <div id="chart_container" style="width: 400px; height: 220px; border: 1px solid #808080;">
+<svg:svg id="chart_container" height="220" width="400">
+ <svg:defs id="defs"></svg:defs>
+ <svg:g>
+ <svg:rect fill="white" height="220" width="400" y="0" x="0"></svg:rect>
+ <svg:text fill="black" font-weight="bold" font-size="10" font-family="Arial" y="16" x="200" text-anchor="middle">Test Chart</svg:text>
+ <svg:rect fill="white" height="83" width="97" y="77" x="296"></svg:rect>
+ <svg:rect fill="red" stroke="none" height="12" width="12" y="84" x="303"></svg:rect>
+ <svg:text fill="black" font-size="12" font-family="Arial" y="94" x="318" onclick="markClick('text_apple')">Apple</svg:text>
+ <svg:rect fill="green" stroke="none" height="12" width="12" y="103" x="303"></svg:rect>
+ <svg:text fill="black" font-size="12" font-family="Arial" y="113" x="318">Orange</svg:text>
+ <svg:rect fill="#808080" stroke="none" height="12" width="12" y="122" x="303"></svg:rect>
+ <svg:text fill="black" font-size="12" font-family="Arial" y="132" x="318">Banana</svg:text>
+ <svg:rect fill="green" stroke="none" height="12" width="12" y="141" x="303"></svg:rect>
+ <svg:text fill="black" font-size="12" font-family="Arial" y="151" x="318">Orange</svg:text>
+ <svg:g onclick="markClick('slice_red')"><svg:path fill="red" stroke="none" d="M148,119L148,43A76,76,0,0,1,198,61.77Z"></svg:path></svg:g>
+ <svg:g onclick="markClick('slice_green')"><svg:path fill="green" stroke="none" d="M148,119L198,61.77A76,76,0,0,1,202.93,171.52Z"></svg:path></svg:g>
+ <svg:g><svg:path fill="#808080" stroke="none" d="M148,119L202.93,171.52A76,76,0,0,1,72.08,122.41Z"></svg:path></svg:g>
+ <svg:g><svg:path fill="green" stroke="none" d="M148,119L72.08,122.41A76,76,0,0,1,148,43Z"></svg:path></svg:g>
+ </svg:g>
+</svg:svg>
+<svg:svg width="400px" height="120px">
+ <svg:desc>Example RotateScale - Rotate and scale transforms</svg:desc>
+ <svg:g fill="none" stroke="black" stroke-width="3" >
+ <!-- Draw the axes of the original coordinate system -->
+ <svg:line x1="0" y1="1.5" x2="400" y2="1.5" />
+ <svg:line x1="1.5" y1="0" x2="1.5" y2="120" />
+ </svg:g>
+ <!-- Establish a new coordinate system whose origin is at (50,30)
+ in the initial coord. system and which is rotated by 30 degrees. -->
+ <svg:g transform="translate(50,30)">
+ <svg:g transform="rotate(30)" id="rotate">
+ <svg:g fill="none" stroke="red" stroke-width="3" >
+ <svg:line x1="0" y1="0" x2="50" y2="0" />
+ <svg:line x1="0" y1="0" x2="0" y2="50" />
+ </svg:g>
+ <svg:text x="0" y="0" font-size="20" font-family="Verdana" fill="blue" >
+ ABC (rotate)
+ </svg:text>
+ </svg:g>
+ </svg:g>
+ <!-- Establish a new coordinate system whose origin is at (200,40)
+ in the initial coord. system and which is scaled by 1.5. -->
+ <svg:g transform="translate(200,40)">
+ <svg:g transform="scale(1.5)">
+ <svg:g fill="none" stroke="red" stroke-width="3" >
+ <svg:line x1="0" y1="0" x2="50" y2="0" />
+ <svg:line x1="0" y1="0" x2="0" y2="50" />
+ </svg:g>
+ <svg:text x="0" y="0" font-size="20" font-family="Verdana" fill="blue" >
+ ABC (scale)
+ </svg:text>
+ </svg:g>
+ </svg:g>
+</svg:svg>
+ <div style="position: absolute; white-space: nowrap; top: 230px; left: 410px; font-family: Arial; font-size: 12px; display: none; ">WOrange</div>
+ </div>
+ <div style="display: none; position: absolute; top: 230px; left: 410px; white-space: nowrap; font-family: Arial; font-size: 12px;">WOrange</div>
+</body>
+</html>