OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
4 <script src="../../http/tests/inspector/debugger-test.js"></script> | 4 <script src="../../http/tests/inspector/debugger-test.js"></script> |
5 <script src="../../http/tests/inspector/sources-test.js"></script> | 5 <script src="../../http/tests/inspector/sources-test.js"></script> |
6 <script src="coverage-test.js"></script> | 6 <script src="coverage-test.js"></script> |
7 | 7 |
8 <script src="resources/coverage.js"></script> | 8 <script src="resources/coverage.js"></script> |
9 | 9 |
10 <script> | 10 <script> |
11 async function test() | 11 async function test() |
12 { | 12 { |
13 InspectorTest.startCoverage(); | 13 InspectorTest.startCoverage(); |
14 await InspectorTest.evaluateInPagePromise("performActions()"); | 14 await InspectorTest.evaluateInPagePromise("performActions()"); |
15 await InspectorTest.stopCoverage(); | 15 await InspectorTest.stopCoverage(); |
16 await UI.inspectorView.showPanel("sources"); | 16 await UI.inspectorView.showPanel("sources"); |
17 await InspectorTest.sourceDecorated("coverage.js"); | 17 await InspectorTest.sourceDecorated("coverage.js"); |
18 | 18 |
19 var decoratorPromise = InspectorTest.addSnifferPromise(Coverage.CoverageView
.LineDecorator.prototype, "decorate"); | 19 var decoratorPromise = InspectorTest.addSnifferPromise(Coverage.CoverageView
.LineDecorator.prototype, "_innerDecorate"); |
20 var editorActions = await self.runtime.allInstances(Sources.SourcesView.Edit
orAction); | 20 var editorActions = await self.runtime.allInstances(Sources.SourcesView.Edit
orAction); |
21 for (action of editorActions) { | 21 for (action of editorActions) { |
22 if (action instanceof Sources.ScriptFormatterEditorAction) { | 22 if (action instanceof Sources.ScriptFormatterEditorAction) { |
23 action._toggleFormatScriptSource(); | 23 action._toggleFormatScriptSource(); |
24 break; | 24 break; |
25 } | 25 } |
26 } | 26 } |
27 await decoratorPromise; | 27 await decoratorPromise; |
28 InspectorTest.dumpDecorationsInSourceFrame(UI.panels.sources.visibleView); | 28 InspectorTest.dumpDecorationsInSourceFrame(UI.panels.sources.visibleView); |
29 InspectorTest.completeTest(); | 29 InspectorTest.completeTest(); |
30 } | 30 } |
31 </script> | 31 </script> |
32 </head> | 32 </head> |
33 <p id="id">PASS</p> | 33 <p id="id">PASS</p> |
34 <body onload="runTest()"> | 34 <body onload="runTest()"> |
35 <p>Tests the gutter decorations in target source code after ScriptFormatterEdito
rAction</p> | 35 <p>Tests the gutter decorations in target source code after ScriptFormatterEdito
rAction</p> |
36 </body> | 36 </body> |
37 </html> | 37 </html> |
OLD | NEW |