Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / events / event-view-toString.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2         "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4 <head>
5     <title>Test for bug 4233558</title>
6 <script type="text/javascript" charset="utf-8">
7     if (window.testRunner) {
8         testRunner.dumpAsText();
9         testRunner.waitUntilDone();
10     }
11
12     function clickBody(event) {
13         var resultsDiv = document.getElementById("resultsDiv");
14         
15         resultsDiv.innerHTML +=  "event.view :<br/>";
16         try {
17             resultsDiv.innerHTML +=  "document: " + event.view.document + "<br/>";
18             resultsDiv.innerHTML +=  "proto: " + event.view.__proto__ + "<br/>";
19             resultsDiv.innerHTML +=  " Success getting " + event.view + "<br/>";
20         }
21         catch(e) {
22             resultsDiv.innerHTML +=  " ERROR (" + e + ") getting value!<br/>";
23         }
24         if (window.testRunner) {
25             testRunner.notifyDone();
26         }
27     }
28
29     function loadHandler() {
30         var resultsDiv = document.getElementById("resultsDiv");
31         if (window.eventSender) {
32             eventSender.mouseMoveTo(50, 50);
33             eventSender.mouseDown();
34             eventSender.mouseUp();
35         } else {
36             resultsDiv.innerHTML += "Manual test mode.<br/>";
37         }
38     }
39 </script>
40 </head>
41 <body onLoad="loadHandler()" onmousedown="clickBody(event)">
42 <p>Test for toString on event.view.  This test simulates a click when run via DumpRenderTree.  Otherwise, click below and you should see "Success":</p>
43 <div  id="resultsDiv" />
44 </body>
45 </html>