Chromium Code Reviews| 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> | 4 <script> |
| 5 | 5 |
| 6 function test() | 6 function test() |
| 7 { | 7 { |
| 8 var obj1, obj2; | 8 var obj1, obj2; |
| 9 | 9 |
| 10 InspectorTest.runTestSuite([ | 10 InspectorTest.runTestSuite([ |
| 11 function testThis(next) | 11 function testThis(next) |
| 12 { | 12 { |
| 13 InspectorTest.RuntimeAgent.evaluate("({ a : 1, b : 2 })", step1); | 13 InspectorTest.RuntimeAgent.evaluate("({ a : 1, b : 2 })", step1); |
| 14 | 14 |
| 15 function step1(error, result, wasThrown) | 15 function step1(error, result) |
|
dgozman
2016/08/11 01:54:35
While you are here, let's add exceptionDetails sec
kozy
2016/08/11 21:04:21
Done.
| |
| 16 { | 16 { |
| 17 | 17 |
| 18 function sum() | 18 function sum() |
| 19 { | 19 { |
| 20 return this.a + this.b; | 20 return this.a + this.b; |
| 21 } | 21 } |
| 22 | 22 |
| 23 obj1 = result; | 23 obj1 = result; |
| 24 InspectorTest.RuntimeAgent.callFunctionOn(obj1.objectId, sum.toS tring(), step2); | 24 InspectorTest.RuntimeAgent.callFunctionOn(obj1.objectId, sum.toS tring(), step2); |
| 25 } | 25 } |
| 26 | 26 |
| 27 function step2(error, result, wasThrown) | 27 function step2(error, result) |
|
dgozman
2016/08/11 01:54:35
While you are here, let's add exceptionDetails sec
kozy
2016/08/11 21:04:21
Done.
| |
| 28 { | 28 { |
| 29 InspectorTest.addResult(result.value); | 29 InspectorTest.addResult(result.value); |
| 30 next(); | 30 next(); |
| 31 } | 31 } |
| 32 }, | 32 }, |
| 33 | 33 |
| 34 function testArguments(next) | 34 function testArguments(next) |
| 35 { | 35 { |
| 36 InspectorTest.RuntimeAgent.evaluate("({ c : 1, d : 2 })", step1); | 36 InspectorTest.RuntimeAgent.evaluate("({ c : 1, d : 2 })", step1); |
| 37 | 37 |
| 38 function step1(error, result, wasThrown) | 38 function step1(error, result) |
|
dgozman
2016/08/11 01:54:35
While you are here, let's add exceptionDetails sec
kozy
2016/08/11 21:04:21
Done.
| |
| 39 { | 39 { |
| 40 function format(aobj1, aobj2, val, undef) | 40 function format(aobj1, aobj2, val, undef) |
| 41 { | 41 { |
| 42 return JSON.stringify(this) + "\n" + JSON.stringify(aobj1) + "\n" + JSON.stringify(aobj2) + "\n" + val + "\n" + undef; | 42 return JSON.stringify(this) + "\n" + JSON.stringify(aobj1) + "\n" + JSON.stringify(aobj2) + "\n" + val + "\n" + undef; |
| 43 } | 43 } |
| 44 | 44 |
| 45 obj2 = result; | 45 obj2 = result; |
| 46 InspectorTest.RuntimeAgent.callFunctionOn(obj1.objectId, format. toString(), [obj1, obj2, {value:4}, {}], step2); | 46 InspectorTest.RuntimeAgent.callFunctionOn(obj1.objectId, format. toString(), [obj1, obj2, {value:4}, {}], step2); |
| 47 } | 47 } |
| 48 | 48 |
| 49 function step2(error, result, wasThrown) | 49 function step2(error, result) |
|
dgozman
2016/08/11 01:54:35
While you are here, let's add exceptionDetails sec
kozy
2016/08/11 21:04:21
Done.
| |
| 50 { | 50 { |
| 51 InspectorTest.addResult(result.value); | 51 InspectorTest.addResult(result.value); |
| 52 next(); | 52 next(); |
| 53 } | 53 } |
| 54 } | 54 } |
| 55 ]); | 55 ]); |
| 56 } | 56 } |
| 57 | 57 |
| 58 </script> | 58 </script> |
| 59 </head> | 59 </head> |
| 60 | 60 |
| 61 <body onload="runTest()"> | 61 <body onload="runTest()"> |
| 62 <p> | 62 <p> |
| 63 Tests InspectorTest.RuntimeAgent.callFunctionOn usages. | 63 Tests InspectorTest.RuntimeAgent.callFunctionOn usages. |
| 64 </p> | 64 </p> |
| 65 | 65 |
| 66 </body> | 66 </body> |
| 67 </html> | 67 </html> |
| OLD | NEW |