| Index: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-sourcemap.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-sourcemap.html b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-sourcemap.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..836b7306a487408dbc57547c8d0700eda2ecf41d
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-sourcemap.html
|
| @@ -0,0 +1,62 @@
|
| +<html>
|
| +<head>
|
| +<script src="../inspector-test.js"></script>
|
| +<script src="../isolated-filesystem-test.js"></script>
|
| +<script src="../debugger-test.js"></script>
|
| +<script src="./persistence-test.js"></script>
|
| +<script src="./automapping-test.js"></script>
|
| +<link href="./resources/s.css" rel="stylesheet">
|
| +<script>
|
| +
|
| +function test()
|
| +{
|
| + InspectorTest.overrideNetworkModificationTime({
|
| + "http://127.0.0.1:8000/inspector/persistence/resources/s.css": null
|
| + });
|
| +
|
| + Promise.all([
|
| + getResourceContent("s.css"),
|
| + getResourceContent("s.scss")
|
| + ]).then(onResourceContents);
|
| +
|
| + function onResourceContents(contents)
|
| + {
|
| + var fs = new InspectorTest.TestFileSystem("file:///var/www");
|
| + InspectorTest.addFiles(fs, {
|
| + "dist/s.css": {
|
| + content: contents[0],
|
| + time: new Date("December 1, 1989")
|
| + },
|
| + "src/s.scss": {
|
| + content: contents[1],
|
| + time: new Date("December 1, 1989")
|
| + }
|
| + });
|
| + fs.reportCreated(onFileSystemCreated);
|
| + }
|
| +
|
| + function onFileSystemCreated()
|
| + {
|
| + var automappingTest = new InspectorTest.AutomappingTest(WebInspector.workspace);
|
| + automappingTest.waitUntilMappingIsStabilized(InspectorTest.completeTest.bind(InspectorTest));
|
| + }
|
| +
|
| + function getResourceContent(name)
|
| + {
|
| + var fulfill;
|
| + var promise = new Promise(x => fulfill = x);
|
| + InspectorTest.waitForScriptSource(name, onSource);
|
| + return promise;
|
| +
|
| + function onSource(uiSourceCode)
|
| + {
|
| + uiSourceCode.requestContent().then(content => fulfill(content));
|
| + }
|
| + }
|
| +}
|
| +</script>
|
| +</head>
|
| +<body onload="runTest()">
|
| +<p>Verify that sourcemap sources are mapped with non-exact match.</p>
|
| +</body>
|
| +</html>
|
|
|