| 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 <link rel="stylesheet" type="text/css" href="resources/decorations-after-inplace
-formatter.css"> | 8 <link rel="stylesheet" type="text/css" href="resources/decorations-after-inplace
-formatter.css"> |
| 9 <link rel="stylesheet" type="text/css" href="resources/long-mangled.css"> | 9 <link rel="stylesheet" type="text/css" href="resources/long-mangled.css"> |
| 10 | 10 |
| 11 <script> | 11 <script> |
| 12 async function test() | 12 async function test() |
| 13 { | 13 { |
| 14 InspectorTest.startCoverage(); | 14 InspectorTest.startCoverage(); |
| 15 await InspectorTest.evaluateInPagePromise("performActions()"); | 15 await InspectorTest.evaluateInPagePromise("performActions()"); |
| 16 await InspectorTest.stopCoverage(); | 16 await InspectorTest.stopCoverage(); |
| 17 var node = InspectorTest.findCoverageNodeForURL("long-mangled.css"); | 17 var node = InspectorTest.findCoverageNodeForURL("long-mangled.css"); |
| 18 var coverageListView = self.runtime.sharedInstance(Coverage.CoverageView)._l
istView; | 18 var coverageListView = self.runtime.sharedInstance(Coverage.CoverageView)._l
istView; |
| 19 var decoratePromise = InspectorTest.addSnifferPromise(Coverage.CoverageView.
LineDecorator.prototype, "decorate"); | 19 var decoratePromise = InspectorTest.addSnifferPromise(Coverage.CoverageView.
LineDecorator.prototype, "_innerDecorate"); |
| 20 coverageListView._revealSourceForNode(node); | 20 coverageListView._revealSourceForNode(node); |
| 21 await decoratePromise; | 21 await decoratePromise; |
| 22 InspectorTest.addResult("The below should be formatted"); | 22 InspectorTest.addResult("The below should be formatted"); |
| 23 InspectorTest.dumpDecorationsInSourceFrame(UI.panels.sources.visibleView); | 23 InspectorTest.dumpDecorationsInSourceFrame(UI.panels.sources.visibleView); |
| 24 | 24 |
| 25 | 25 |
| 26 node = InspectorTest.findCoverageNodeForURL("decorations-after-inplace-forma
tter.css"); | 26 node = InspectorTest.findCoverageNodeForURL("decorations-after-inplace-forma
tter.css"); |
| 27 decoratePromise = InspectorTest.addSnifferPromise(Coverage.CoverageView.Line
Decorator.prototype, "decorate"); | 27 decoratePromise = InspectorTest.addSnifferPromise(Coverage.CoverageView.Line
Decorator.prototype, "_innerDecorate"); |
| 28 coverageListView._revealSourceForNode(node); | 28 coverageListView._revealSourceForNode(node); |
| 29 await decoratePromise; | 29 await decoratePromise; |
| 30 InspectorTest.addResult("The below should NOT be formatted"); | 30 InspectorTest.addResult("The below should NOT be formatted"); |
| 31 InspectorTest.dumpDecorationsInSourceFrame(UI.panels.sources.visibleView); | 31 InspectorTest.dumpDecorationsInSourceFrame(UI.panels.sources.visibleView); |
| 32 | 32 |
| 33 InspectorTest.completeTest(); | 33 InspectorTest.completeTest(); |
| 34 } | 34 } |
| 35 </script> | 35 </script> |
| 36 </head> | 36 </head> |
| 37 <p id="id">PASS</p> | 37 <p id="id">PASS</p> |
| 38 <body onload="runTest()"> | 38 <body onload="runTest()"> |
| 39 <p>Tests the CSS highlight in sources after the Pretty print formatting.</p> | 39 <p>Tests the CSS highlight in sources after the Pretty print formatting.</p> |
| 40 </body> | 40 </body> |
| 41 </html> | 41 </html> |
| OLD | NEW |