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 context = new UI.Context(); | 8 var context = new UI.Context(); |
9 context.addFlavorChangeListener(SDK.ExecutionContext, executionContextChange
d, this); | 9 context.addFlavorChangeListener(SDK.ExecutionContext, executionContextChange
d, this); |
10 context.addFlavorChangeListener(SDK.Target, targetChanged, this); | 10 context.addFlavorChangeListener(SDK.Target, targetChanged, this); |
11 new Components.ExecutionContextSelector(SDK.targetManager, context); | 11 new Main.ExecutionContextSelector(SDK.targetManager, context); |
12 | 12 |
13 function executionContextChanged(event) | 13 function executionContextChanged(event) |
14 { | 14 { |
15 var executionContext = event.data; | 15 var executionContext = event.data; |
16 InspectorTest.addResult("Execution context selected: " + (executionConte
xt.isDefault ? executionContext.target().name() + ":" + executionContext.frameId
: executionContext.name)); | 16 InspectorTest.addResult("Execution context selected: " + (executionConte
xt.isDefault ? executionContext.target().name() + ":" + executionContext.frameId
: executionContext.name)); |
17 } | 17 } |
18 | 18 |
19 function targetChanged(event) | 19 function targetChanged(event) |
20 { | 20 { |
21 InspectorTest.addResult("Target selected: " + event.data.name()); | 21 InspectorTest.addResult("Target selected: " + event.data.name()); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 </script> | 96 </script> |
97 </head> | 97 </head> |
98 | 98 |
99 <body onload="runTest()"> | 99 <body onload="runTest()"> |
100 <p> | 100 <p> |
101 Tests how execution context and target are selected. | 101 Tests how execution context and target are selected. |
102 </p> | 102 </p> |
103 | 103 |
104 </body> | 104 </body> |
105 </html> | 105 </html> |
OLD | NEW |