blob: 9b2b6e7a0f6d685b6fb8ee09537b99066443c87c [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult(`Verify that automapping is capable of mapping file:// urls with special characters.\n`);
await TestRunner.loadModule('bindings_test_runner');
var app_js = {content: 'console.log(\'foo.js!\');', time: null};
var automappingTest = new BindingsTestRunner.AutomappingTest(new Workspace.Workspace());
automappingTest.addNetworkResources({
// Make sure main resource gets mapped.
'file:///usr/local/node/script%201.js': app_js,
'file:///usr/local/node/script%25201.js': app_js,
});
var fs = new BindingsTestRunner.TestFileSystem('file:///usr/local/node');
BindingsTestRunner.addFiles(fs, {
'script 1.js': app_js,
'script%201.js': app_js,
});
fs.reportCreated(onFileSystemCreated);
function onFileSystemCreated() {
automappingTest.waitUntilMappingIsStabilized().then(TestRunner.completeTest.bind(TestRunner));
}
})();