<html>
<head>
<script src="../http/tests/inspector/inspector-test.js"></script>
+<script src="../http/tests/inspector/console-test.js"></script>
<script src="../http/tests/inspector/workspace-test.js"></script>
<script src="../http/tests/inspector/debugger-test.js"></script>
<script src="resources/example-fileset-for-test.js"></script>
<script>
function test()
{
- WebInspector.showPanel("sources");
var panel = WebInspector.panels.sources;
+ var sourcesView = panel._sourcesView;
+ var historyManager = sourcesView._historyManager;
+ var editorContainer = sourcesView._editorContainer;
function rollback()
{
- panel._historyManager.rollback();
+ historyManager.rollback();
}
function rollover()
{
- panel._historyManager.rollover();
+ historyManager.rollover();
}
function dumpSelection(editor, label)
function testCloseCrossFile(next)
{
- var selectedTab = panel._editorContainer._tabbedPane.selectedTabId;
- panel._editorContainer._tabbedPane.closeTab(selectedTab);
+ var selectedTab = editorContainer._tabbedPane.selectedTabId;
+ editorContainer._tabbedPane.closeTab(selectedTab);
dumpSelection(panel.visibleView.textEditor, "Close active tab");
for (var i = 0; i < 1; ++i) {
rollback();
function onScriptSource(uiSourceCode)
{
var linkifier = new WebInspector.Linkifier();
- WebInspector.showPanel("timeline");
var anchorURI = uiSourceCode.url;
- var anchor = linkifier.linkifyLocation(anchorURI, 10, 1);
- WebInspector.Revealer.reveal(anchor.__uiLocation);
- InspectorTest.addResult("Selection: " + panel.visibleView.textEditor.selection().toString());
- dumpSelection(panel.visibleView.textEditor, "Showed anchor in " + anchorURI.split("/").pop() + " with line 333 column 3");
- rollback();
- dumpSelection(panel.visibleView.textEditor, "Rolled back");
- rollover();
- dumpSelection(panel.visibleView.textEditor, "Rolled over");
- next();
+ var anchor = linkifier.linkifyScriptLocation(WebInspector.targetManager.mainTarget(), null, anchorURI, 10, 1);
+ WebInspector.Revealer.revealPromise(anchor.__uiLocation).then(function() {
+ InspectorTest.addResult("Selection: " + panel.visibleView.textEditor.selection().toString());
+ dumpSelection(panel.visibleView.textEditor, "Showed anchor in " + anchorURI.split("/").pop() + " with line 333 column 3");
+ rollback();
+ dumpSelection(panel.visibleView.textEditor, "Rolled back");
+ rollover();
+ dumpSelection(panel.visibleView.textEditor, "Rolled over");
+ next();
+ });
}
},
panel.showUISourceCode(uiSourceCode, jumps[i]);
dumpSelection(panel.visibleView.textEditor, "jump to line " + jumps[i]);
}
- panel.highlightPosition(40, 10);
+ panel.showUISourceCode(uiSourceCode, 40, 10);
dumpSelection(panel.visibleView.textEditor, "highlight line 40");
for (var i = 0; i < jumps.length + 1; ++i) {
rollback();