[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.22
[framework/web/webkit-efl.git] / LayoutTests / inspector / inspected-objects-not-overriden.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <head>
4 <script src="../http/tests/inspector/inspector-test.js"></script>
5 <script>
6
7 function myImpl() {
8   return "my value";
9 }
10
11 // Provide some custom methods.
12 Object.type = myImpl;
13 Object.hasProperties = myImpl;
14 Object.describe = myImpl;
15 Object.className = myImpl;
16 String.prototype.escapeCharacters = myImpl;
17 JSON.stringify = myImpl;
18
19 function output(text)
20 {
21     var output = document.getElementById("output");
22     output.appendChild(document.createTextNode(text));
23     output.appendChild(document.createElement("br"));
24 }
25
26 function dumpValues()
27 {
28     // Check that the methods haven't changed.
29     output("myImpl() => " + myImpl());
30     output("Object.type === myImpl => " + (Object.type === myImpl));
31     output("Object.hasProperties === myImpl => " + (Object.hasProperties === myImpl));
32     output("Object.describe === myImpl => " + (Object.describe === myImpl));
33     output("Object.className === myImpl => " + (Object.className === myImpl));
34     output("String.prototype.escapeCharacters === myImpl => " + (String.prototype.escapeCharacters === myImpl));
35     output("JSON.stringify === myImpl => " + (JSON.stringify === myImpl));
36 }
37
38 function test()
39 {
40     function callback()
41     {
42         InspectorTest.completeTest();
43     }
44     InspectorTest.evaluateInPage("dumpValues()", callback);
45 }
46 </script>
47 </head>
48
49 <body onload="runTest()">
50 <p>
51 Tests that opening inspector front-end doesn't change methods defined by the inspected application.
52 </p>
53
54 <div id="output"></div>
55
56 </body>
57 </html>