Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / pointer-events-text.svg
bloba34c68322b0fa13cdb3f3c5c421eec1edec49b0b
1 <?xml version="1.0"?>
2 <svg xmlns="http://www.w3.org/2000/svg" onload="fillTestContent()">
3 <script type="text/javascript">
4 <![CDATA[
6 if (window.testRunner)
7 testRunner.waitUntilDone();
9 var visibleValues = [ 'visible', 'hidden' ];
10 var fillValues = ['none', 'orange' ];
11 var strokeValues = ['none', 'blue' ];
13 var pointerEventsValues = ['auto', 'visiblePainted', 'visibleFill', 'visibleStroke', 'visible', 'painted', 'fill', 'stroke', 'all', 'none'];
15 var leftEdge = 100;
16 var topEdge = 30;
18 var rectSpacing = 57;
20 var svgNS = "http://www.w3.org/2000/svg";
22 function clickHit(event, identifierString) {
23 var fillText = document.getElementById('fill-text' + identifierString);
24 fillText.textContent = 'HIT';
27 function fillTestContent() {
28 var xOffset = leftEdge;
29 var yOffset = topEdge;
31 var testContent = document.getElementById("test-content");
33 for (var pi = 0; pi < pointerEventsValues.length; pi++) {
34 var eventLabel = document.createElementNS(svgNS, 'text');
35 eventLabel.setAttribute('x', 0);
36 eventLabel.setAttribute('y', yOffset + 30);
37 eventLabel.textContent = pointerEventsValues[pi];
38 testContent.appendChild(eventLabel);
40 for (var vi = 0; vi < visibleValues.length; vi++) {
41 for (var fi = 0; fi < fillValues.length; fi++) {
42 for (var si = 0; si < strokeValues.length; si++) {
44 var identString = "_" + pi + "_" + vi + "_" + fi + "_" + si;
46 var txt = document.createElementNS(svgNS, 'text');
47 txt.setAttribute('x', xOffset);
48 txt.setAttribute('y', yOffset + 30);
49 txt.setAttribute('font-size', 40);
50 txt.setAttribute('visibility', visibleValues[vi]);
51 txt.setAttribute('fill', fillValues[fi]);
52 txt.setAttribute('stroke', strokeValues[si]);
53 txt.setAttribute('pointer-events', pointerEventsValues[pi]);
54 txt.setAttribute('onclick', 'clickHit(evt, "' + identString + '")');
55 txt.appendChild(document.createTextNode("#"));
57 testContent.appendChild(txt);
59 var fillText = document.createElementNS(svgNS, 'text');
60 fillText.setAttribute('x', xOffset + 5);
61 fillText.setAttribute('y', yOffset + 20);
62 fillText.textContent = "miss";
63 fillText.setAttribute('id', 'fill-text' + identString);
64 fillText.setAttribute('pointer-events', 'none');
65 testContent.appendChild(fillText);
67 if (window.eventSender) {
68 // Cell click
69 eventSender.mouseMoveTo(xOffset + 5, yOffset);
70 eventSender.mouseDown();
71 eventSender.mouseUp();
73 xOffset += rectSpacing;
77 xOffset = leftEdge;
78 yOffset += rectSpacing;
81 if (window.testRunner)
82 testRunner.notifyDone();
84 ]]>
85 </script>
87 <text x="110" y="20">Visibility: visible</text>
88 <text x="340" y="20">Visibility: hidden</text>
89 <g id="test-content"/>
90 </svg>