2011-03-03 Ilya Tikhonovsky <loislo@chromium.org>
[WebKit-https.git] / LayoutTests / inspector / protocol / runtime-agent.html
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/protocol-test.js"></script>
5 <script>
6
7 function TestObject()
8 {
9     this.removedBySetPropertyValue = "doesn't work";
10 }
11
12 testObject = new TestObject();
13 testProperty = true;
14
15 function test()
16 {
17     function callback(result)
18     {
19         var testSuite = [
20             ["evaluate", 'testObject', 'test', false],
21             ["evaluateOn", result.objectId, 'this.assignedByEvaluateOn = "evaluateOn function works fine";'],
22             ["setPropertyValue", result.objectId, 'assignedBySetPropertyValue', 'true'],
23             ["setPropertyValue", result.objectId, 'removedBySetPropertyValue', ''],
24             ["getProperties", result.objectId, false, false],
25             ["releaseObject", result.objectId],
26             ["releaseWrapperObjectGroup", result.objectId.injectedScriptId, 'test'],
27             ["getCompletions", 'testProperty', false],
28             ["getCompletions", 'testProperty', true]];
29
30         InspectorTest.runProtocolTestSuite("RuntimeAgent", testSuite, ['seq', 'id', 'injectedScriptId']);
31     }
32
33     RuntimeAgent.evaluate('window.testObject', 'test', false, callback);
34 }
35
36 </script>
37 </head>
38
39 <body onload="runTest()">
40 <p>
41 Protocol stability test. It is dumping request/response pairs of RuntimeAgent functions.
42 </p>
43
44 </body>
45 </html>