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/debugger-test.js"></script> | 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
5 <script src="../../../http/tests/inspector/workspace-test.js"></script> | 5 <script src="../../../http/tests/inspector/workspace-test.js"></script> |
6 <script> | 6 <script> |
7 function test() | 7 function test() |
8 { | 8 { |
9 var defaultScriptMapping; | 9 var defaultScriptMapping; |
| 10 var target = WebInspector.debuggerModel.target(); |
| 11 |
10 function createResourceScriptMapping() | 12 function createResourceScriptMapping() |
11 { | 13 { |
12 InspectorTest.createWorkspace(); | 14 InspectorTest.createWorkspace(); |
13 defaultScriptMapping = new WebInspector.DefaultScriptMapping(WebInspecto
r.debuggerModel, InspectorTest.testWorkspace); | 15 InspectorTest.testTargetManager.addTarget(target); |
14 var resourceScriptMapping = new WebInspector.ResourceScriptMapping(WebIn
spector.debuggerModel, InspectorTest.testWorkspace); | 16 defaultScriptMapping = new WebInspector.DefaultScriptMapping(WebInspecto
r.debuggerModel, InspectorTest.testWorkspace, InspectorTest.testDebuggerWorkspac
eBinding); |
| 17 var resourceScriptMapping = new WebInspector.ResourceScriptMapping(WebIn
spector.debuggerModel, InspectorTest.testWorkspace, InspectorTest.testDebuggerWo
rkspaceBinding); |
15 return resourceScriptMapping; | 18 return resourceScriptMapping; |
16 } | 19 } |
17 | 20 |
18 var target = WebInspector.debuggerModel.target(); | |
19 | |
20 function uiLocation(script, lineNumber, columnNumber) | 21 function uiLocation(script, lineNumber, columnNumber) |
21 { | 22 { |
22 var location = script.target().debuggerModel.createRawLocation(script, l
ineNumber, columnNumber); | 23 var location = script.target().debuggerModel.createRawLocation(script, l
ineNumber, columnNumber); |
23 return WebInspector.debuggerWorkspaceBinding.rawLocationToUILocation(loc
ation); | 24 return InspectorTest.testDebuggerWorkspaceBinding.rawLocationToUILocatio
n(location); |
24 } | 25 } |
25 | 26 |
26 function resetModels() | 27 function resetModels() |
27 { | 28 { |
28 WebInspector.debuggerModel._reset(); | 29 WebInspector.debuggerModel._reset(); |
29 } | 30 } |
30 | 31 |
31 InspectorTest.runTestSuite([ | 32 InspectorTest.runTestSuite([ |
32 function testScriptWithPendingResource(next) | 33 function testScriptWithPendingResource(next) |
33 { | 34 { |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 } | 217 } |
217 ]); | 218 ]); |
218 }; | 219 }; |
219 | 220 |
220 </script> | 221 </script> |
221 </head> | 222 </head> |
222 <body onload="runTest()"> | 223 <body onload="runTest()"> |
223 <p>Tests ResourceScriptMapping class.</p> | 224 <p>Tests ResourceScriptMapping class.</p> |
224 </body> | 225 </body> |
225 </html> | 226 </html> |
OLD | NEW |