OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | |
4 <script src="../../http/tests/inspector/debugger-test.js"></script> | |
5 <script src="../../http/tests/inspector/sources-test.js"></script> | |
6 <script src="coverage-test.js"></script> | |
7 | |
8 <link rel="stylesheet" type="text/css" href="resources/decorations-after-inplace
-formatter.css"> | |
9 | |
10 <script> | |
11 async function test() | |
12 { | |
13 InspectorTest.startCoverage(); | |
14 await InspectorTest.evaluateInPagePromise("performActions()"); | |
15 await InspectorTest.stopCoverage(); | |
16 await UI.inspectorView.showPanel("sources"); | |
17 var formatter = await inplaceFormatter(); | |
18 var sourceFrame = await InspectorTest.sourceDecorated("decorations-after-inp
lace-formatter.css"); | |
19 var decoratorPromise = InspectorTest.addSnifferPromise(Coverage.CoverageView
.LineDecorator.prototype, "decorate"); | |
20 formatter._formatSourceInPlace(); | |
21 await decoratorPromise; | |
22 | |
23 InspectorTest.dumpDecorationsInSourceFrame(sourceFrame); | |
24 InspectorTest.completeTest(); | |
25 | |
26 async function inplaceFormatter() | |
27 { | |
28 var editorActions = await self.runtime.allInstances(Sources.SourcesView.
EditorAction); | |
29 for (var i = 0; i < editorActions.length; ++i) { | |
30 if (editorActions[i] instanceof Sources.InplaceFormatterEditorAction
) | |
31 return editorActions[i]; | |
32 } | |
33 } | |
34 } | |
35 </script> | |
36 </head> | |
37 <p id="id">PASS</p> | |
38 <body onload="runTest()"> | |
39 <p>Tests the CSS highlight in sources after the Pretty print formatting.</p> | |
40 </body> | |
41 </html> | |
OLD | NEW |