OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
4 <script src="../../http/tests/inspector/console-test.js"></script> | 4 <script src="../../http/tests/inspector/console-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 function doit() | 7 function doit() |
8 { | 8 { |
9 console.dir(window); | 9 console.dir(window); |
10 runTest(); | 10 runTest(); |
11 } | 11 } |
12 | 12 |
13 function test() | 13 function test() |
14 { | 14 { |
15 InspectorTest.RuntimeAgent.evaluate("window", "console", false, evalCallback
); | 15 InspectorTest.RuntimeAgent.evaluate("window", "console", false).then(evalCal
lback); |
16 | 16 |
17 function evalCallback(error, result) | 17 function evalCallback(result) |
18 { | 18 { |
19 if (error) { | 19 if (!result) { |
20 testController.notifyDone("Exception:" + error); | 20 testController.notifyDone("Exception"); |
21 return; | 21 return; |
22 } | 22 } |
23 if (result.type === "error") | 23 if (result.type === "error") |
24 testController.notifyDone("Exception:" + result); | 24 testController.notifyDone("Exception:" + result); |
25 var objectProxy = InspectorTest.runtimeModel.createRemoteObject(result); | 25 var objectProxy = InspectorTest.runtimeModel.createRemoteObject(result); |
26 objectProxy.getOwnProperties(false, getPropertiesCallback); | 26 objectProxy.getOwnProperties(false, getPropertiesCallback); |
27 } | 27 } |
28 | 28 |
29 function getPropertiesCallback(properties) | 29 function getPropertiesCallback(properties) |
30 { | 30 { |
(...skipping 13 matching lines...) Expand all Loading... |
44 </script> | 44 </script> |
45 </head> | 45 </head> |
46 | 46 |
47 <body onload="doit()"> | 47 <body onload="doit()"> |
48 <p> | 48 <p> |
49 Tests that console dumps global object with properties. | 49 Tests that console dumps global object with properties. |
50 </p> | 50 </p> |
51 | 51 |
52 </body> | 52 </body> |
53 </html> | 53 </html> |
OLD | NEW |