WebCore/manual-tests/mouseevents-on-textnodes.html
changeset 0 4f2f89ce4247
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       
     2         "http://www.w3.org/TR/html4/strict.dtd">
       
     3 <html lang="en">
       
     4 <head>
       
     5 <script type="text/javascript" language="javascript" charset="utf-8">
       
     6 	
       
     7 	document.onmousedown = doIt;
       
     8 		
       
     9 	function doIt(evt) {
       
    10 		var elem = evt.target;
       
    11 		var anAttr = null;
       
    12 		alert (elem);
       
    13 	}
       
    14 	
       
    15 </script>
       
    16 
       
    17 </head>
       
    18 <body>
       
    19 <p><b>BUG ID:</b> <a href="rdar://problem/4196646">4196646</a> target returns text node when it should return the parent node</p>
       
    20 
       
    21 <p id="test" style="background-color:skyblue; padding:3px;"><b>STEPS TO TEST:</b> 
       
    22 Click where indicated below.
       
    23 </p>
       
    24 
       
    25 <p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b> 
       
    26 After clicking, see alert dialogs as described below.
       
    27 </p>
       
    28 
       
    29 <p id="failure" style="background-color:#FF3300; padding:3px;"><b>TEST FAIL:</b> 
       
    30 After clicking, see alert dialogs other than what is described below.
       
    31 Specifically, tests #1 and #3 below will alert "[object TEXT]"
       
    32 </p>
       
    33 
       
    34 <p>1. click on this text - you should see an alert that says "[object P]"</p>
       
    35 
       
    36 <div style="border: 1px dotted red; width: 500px; ">2. click on white space next to this text --> <br>you should see an alert that says "[object DIV]" --> </div><br>
       
    37 
       
    38 3. click on this text - you should see an alert that says "[object BODY]"<br><br>
       
    39 
       
    40 4. click on empty whitespace on this page, below this text - you should see an alert that says "[object HTML]"
       
    41 
       
    42 </body>
       
    43 </html>