blob: 0ed8e24e4b48d02e5619982f7775babc165cdde0 [file] [log] [blame]
<html>
<head>
<script src="../inspector-test.js"></script>
<script src="../debugger-test.js"></script>
<script src="../isolated-filesystem-test.js"></script>
<script src="./persistence-test.js"></script>
<script src="./resources/foo.js"></script>
<script>
function test()
{
var testMapping = InspectorTest.initializeTestMapping();
var fs = new InspectorTest.TestFileSystem("file:///var/www");
InspectorTest.addFooJSFile(fs);
fs.reportCreated(function() { });
InspectorTest.runTestSuite([
function waitForUISourceCodes(next)
{
Promise.all([
InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTypes.Network),
InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTypes.FileSystem)
]).then(next);
},
function goToSourceDialogBeforeBinding(next)
{
dumpGoToSourceDialog();
next();
},
function addFileSystemMapping(next)
{
testMapping.addBinding("foo.js");
InspectorTest.waitForBinding("foo.js").then(next);
},
function goToSourceAfterBinding(next)
{
dumpGoToSourceDialog();
next();
},
]);
function dumpGoToSourceDialog()
{
UI.panels.sources._sourcesView.showOpenResourceDialog();
var dialog = Sources.OpenResourceDialog._instanceForTest;
var keys = [];
for (var i = 0; i < dialog.itemCount(); ++i)
keys.push(dialog.itemKeyAt(i));
keys.sort();
InspectorTest.addResult(keys.join("\n"));
UI.Dialog._instance.hide();
}
};
</script>
</head>
<body onload="runTest()">
<p>Verify that GoTo source dialog filters out mapped uiSourceCodes.</p>
</body>
</html>