1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <meta http-equiv="Content-type" content="text/html; charset=utf-8">
6 <title>Test for pointer-events property</title>
7 <style type="text/css" media="screen">
21 .row6 { top: 140px; left: 340px;}
22 .row7 { top: 240px; left: 340px;}
23 .row8 { top: 340px; left: 340px;}
24 .row9 { top: 440px; left: 340px;}
25 .row10 { top: 540px; left: 340px; }
85 #p7 { /* this is a div - not a p */
99 #p9 { /* this is a div - not a p */
100 pointer-events: none;
110 pointer-events: auto;
117 pointer-events: auto;
126 pointer-events: none;
133 pointer-events: none;
138 pointer-events: auto;
143 pointer-events: auto;
148 pointer-events: none;
154 if (window.testRunner) {
155 testRunner.waitUntilDone();
158 var pointerEventsValues = ['auto', 'none'];
162 function clickHit(event) {
163 // iterate up to the containing row
164 var parent = event.target;
165 while (parent && (!parent.className || !parent.className.match(/^row/))) {
166 parent = parent.parentNode;
168 if (parent && parent.className && parent.className.match(/^row/)) {
169 var actual = parent.querySelector(".col3");
170 if (actual && event.target.id)
171 actual.innerText = event.target.id;
175 function testContent() {
178 var yOffset = topEdge;
179 for (var i=0; i < 5; i++) {
180 if (window.eventSender) {
181 eventSender.mouseMoveTo(15, yOffset + 5);
182 eventSender.mouseDown();
183 eventSender.mouseUp();
190 for (var i=0; i < 5; i++) {
191 if (window.eventSender) {
192 eventSender.mouseMoveTo(345, yOffset + 5);
193 eventSender.mouseDown();
194 eventSender.mouseUp();
199 if (window.testRunner)
200 testRunner.notifyDone();
205 <body onload="testContent()" onclick="clickHit(event)">
206 <h1>Testing the values of 'pointer-events' on HTML content</h1>
207 <p>This test is expected to be run from within DumpRenderTree. If running manually, click on
208 the elements in the first column, making sure the actual result (3rd column) matches
209 the expected result (2nd column). Repeat for click target (4th column), expected result (5th column)
210 and actual result (6th column). Note: You should click on a yellow inline element if
211 one exists, otherwise anywhere in the box.</p>
213 <div class="row row1">
214 <div class="col col1">
215 <p id="p1">pointer-events auto</p>
217 <div class="col col2">p1</div>
218 <div class="col col3">none</div>
221 <div class="row row2">
222 <div class="col col1">
223 <p id="p2">pointer-events none</p>
225 <div class="col col2">none</div>
226 <div class="col col3">none</div>
229 <div class="row row3">
230 <div class="col col1">
231 <p id="p3">siblings - auto on top</p>
234 <div class="col col2">p4</div>
235 <div class="col col3">none</div>
238 <div class="row row4">
239 <div class="col col1">
240 <p id="p5">siblings - none on top</p>
243 <div class="col col2">p5</div>
244 <div class="col col3">none</div>
247 <div class="row row5">
248 <div class="col col1">
250 <p id="p8">nested - auto outer</p>
253 <div class="col col2">p7</div>
254 <div class="col col3">none</div>
257 <div class="row row6">
258 <div class="col col1">
260 <p id="p10">nested - none outer</p>
263 <div class="col col2">p10</div>
264 <div class="col col3">none</div>
267 <div class="row row7">
268 <div class="col col1">
269 <img id="p11" src="resources/abe.png">
271 <div class="col col2">p11</div>
272 <div class="col col3">none</div>
275 <div class="row row8">
276 <div class="col col1">
277 <img id="p12" src="resources/abe.png">
279 <div class="col col2">none</div>
280 <div class="col col3">none</div>
283 <div class="row row9">
284 <div class="col col1">
285 <p id="p13"><span id="p14">inline</span> has auto, parent none
288 <div class="col col2">p14</div>
289 <div class="col col3">none</div>
292 <div class="row row10">
293 <div class="col col1">
294 <p id="p15"><span id="p16">inline</span> has none, parent auto
297 <div class="col col2">p15</div>
298 <div class="col col3">none</div>