blob: 3d80009021e6238a1eae306bd7aec480f1b25b49 [file] [log] [blame]
<html>
<head>
<script src="../inspector-test.js"></script>
<script src="../debugger-test.js"></script>
<script src="../console-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)
.then(uiSourceCode => uiSourceCode.setWorkingCopy("dirty.")),
InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTypes.FileSystem)
]).then(next);
},
function addFileSystemMapping(next)
{
InspectorTest.addSniffer(Persistence.Persistence.prototype, '_prevalidationFailedForTest', onPrevalidationFailed);
testMapping.addBinding('foo.js');
function onPrevalidationFailed(binding)
{
InspectorTest.addResult("Failed to create binding: " + binding);
next();
}
},
]);
};
</script>
</head>
<body onload="runTest()">
<p>Verify that dirty uiSourceCodes are not bound.</p>
</body>
</html>