| 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 src="../http/tests/inspector/workspace-test.js"></script> | 5 <script src="../http/tests/inspector/workspace-test.js"></script> |
| 6 <script src="../http/tests/inspector/debugger-test.js"></script> | 6 <script src="../http/tests/inspector/debugger-test.js"></script> |
| 7 <script src="resources/example-fileset-for-test.js"></script> | 7 <script src="resources/example-fileset-for-test.js"></script> |
| 8 <script src="editor/editor-test.js"></script> | 8 <script src="editor/editor-test.js"></script> |
| 9 <script> | 9 <script> |
| 10 function test() | 10 function test() |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 function testShowAnchorLocation(next) | 217 function testShowAnchorLocation(next) |
| 218 { | 218 { |
| 219 dumpSelection("Before switching to other panel"); | 219 dumpSelection("Before switching to other panel"); |
| 220 InspectorTest.waitForScriptSource("workspace-test.js", onScriptSourc
e); | 220 InspectorTest.waitForScriptSource("workspace-test.js", onScriptSourc
e); |
| 221 function onScriptSource(uiSourceCode) | 221 function onScriptSource(uiSourceCode) |
| 222 { | 222 { |
| 223 var linkifier = new Components.Linkifier(); | 223 var linkifier = new Components.Linkifier(); |
| 224 var anchorURI = uiSourceCode.url(); | 224 var anchorURI = uiSourceCode.url(); |
| 225 var anchor = linkifier.linkifyScriptLocation(SDK.targetManager.m
ainTarget(), null, anchorURI, 10, 1); | 225 var anchor = linkifier.linkifyScriptLocation(SDK.targetManager.m
ainTarget(), null, anchorURI, 10, 1); |
| 226 Common.Revealer.revealPromise(anchor[Components.Linkifier._uiLoc
ationSymbol]).then(function() { | 226 var info = Components.Linkifier._linkInfo(anchor); |
| 227 Common.Revealer.revealPromise(info.uiLocation).then(function() { |
| 227 InspectorTest.addResult("Selection: " + panel.visibleView.te
xtEditor.selection().toString()); | 228 InspectorTest.addResult("Selection: " + panel.visibleView.te
xtEditor.selection().toString()); |
| 228 dumpSelection("Showed anchor in " + anchorURI.split("/").pop
() + " with line 333 column 3"); | 229 dumpSelection("Showed anchor in " + anchorURI.split("/").pop
() + " with line 333 column 3"); |
| 229 rollback(); | 230 rollback(); |
| 230 dumpSelection("Rolled back"); | 231 dumpSelection("Rolled back"); |
| 231 rollover(); | 232 rollover(); |
| 232 dumpSelection("Rolled over"); | 233 dumpSelection("Rolled over"); |
| 233 next(); | 234 next(); |
| 234 }); | 235 }); |
| 235 } | 236 } |
| 236 }, | 237 }, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 257 } | 258 } |
| 258 } | 259 } |
| 259 ]); | 260 ]); |
| 260 }; | 261 }; |
| 261 </script> | 262 </script> |
| 262 </head> | 263 </head> |
| 263 <body onload="runTest()"> | 264 <body onload="runTest()"> |
| 264 <p>Tests that jumping to previous location works as intended.</p> | 265 <p>Tests that jumping to previous location works as intended.</p> |
| 265 </body> | 266 </body> |
| 266 </html> | 267 </html> |
| OLD | NEW |