| Index: third_party/WebKit/LayoutTests/http/tests/inspector/sources-test.js
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/sources-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/sources-test.js
|
| index 3b0d95e491d31ca9577905cb825b09a72c7d7e9c..33e368fdce11e67516548f4d057d3300dce8c83b 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/inspector/sources-test.js
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/sources-test.js
|
| @@ -32,6 +32,26 @@ InspectorTest.testPrettyPrint = function(mimeType, text, mappingQueries, next)
|
| }
|
| }
|
|
|
| +InspectorTest.testJavascriptOutline = function(text) {
|
| + var fulfill;
|
| + var promise = new Promise(x => fulfill = x);
|
| + Common.formatterWorkerPool.javaScriptOutline(text, onChunk);
|
| + var items = [];
|
| + return promise;
|
| +
|
| + function onChunk(isLastChunk, outlineItems) {
|
| + items.pushAll(outlineItems);
|
| + if (!isLastChunk)
|
| + return;
|
| + InspectorTest.addResult('Text:');
|
| + InspectorTest.addResult(text.split('\n').map(line => ' ' + line).join('\n'));
|
| + InspectorTest.addResult('Outline:');
|
| + for (var item of items)
|
| + InspectorTest.addResult(' ' + item.name + item.arguments + ':' + item.line + ':' + item.column);
|
| + fulfill();
|
| + }
|
| +}
|
| +
|
| InspectorTest.dumpSwatchPositions = function(sourceFrame, bookmarkType)
|
| {
|
| var textEditor = sourceFrame.textEditor;
|
|
|