| Index: third_party/WebKit/LayoutTests/http/tests/inspector/inline-source-map-loading.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/inline-source-map-loading.html b/third_party/WebKit/LayoutTests/http/tests/inspector/inline-source-map-loading.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e2ad9473aba6262bb4fe1a0f045d682116ed4921
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/inline-source-map-loading.html
|
| @@ -0,0 +1,36 @@
|
| +<html>
|
| +<head>
|
| +<script src="inspector-test.js"></script>
|
| +
|
| +<script>
|
| +
|
| +function test() {
|
| + var client = {};
|
| + var sourceMap = {
|
| + "file":"compiled.js",
|
| + "mappings":"AAASA,QAAAA,IAAG,CAACC,CAAD,CAAaC,CAAb,CACZ,CACI,MAAOD,EAAP,CAAoBC,CADxB,CAIA,IAAIC,OAAS;",
|
| + "sources":["source.js"],
|
| + "sourcesContent":["<source content>"]
|
| + };
|
| + var sourceMapURL = "data:application/json;base64," + btoa(JSON.stringify(sourceMap));
|
| + var scriptSource = "\n//# sourceMappingURL=" + sourceMapURL + "\n";
|
| + InspectorTest.evaluateInPage(scriptSource);
|
| + InspectorTest.debuggerModel.sourceMapManager().addEventListener(SDK.SourceMapManager.Events.SourceMapAttached, onSourceMap);
|
| +
|
| + function onSourceMap(event) {
|
| + var sourceMap = event.data.sourceMap;
|
| + InspectorTest.addResult('SourceMap Loaded:');
|
| + InspectorTest.addResult('url: ' + sourceMap.url());
|
| + InspectorTest.addResult('compiledURL: ' + sourceMap.compiledURL());
|
| + InspectorTest.completeTest();
|
| + }
|
| +}
|
| +
|
| +</script>
|
| +
|
| +</head>
|
| +
|
| +<body onload="runTest()">
|
| +<p>Verify that inline sourcemap has proper URL and compiledURL.</p>
|
| +</body>
|
| +</html>
|
|
|