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="coverage-test.js"></script> |
| 6 |
| 7 <script> |
| 8 function used1() { |
| 9 window.a += 4; |
| 10 } |
| 11 |
| 12 function unused1() { |
| 13 window.a += 1; |
| 14 } |
| 15 </script> |
| 16 |
| 17 <script> |
| 18 function unused2() { |
| 19 window.a += 0.5; |
| 20 } |
| 21 |
| 22 function used2() { |
| 23 window.a += 4; |
| 24 } |
| 25 </script> |
| 26 |
| 27 <style> |
| 28 .used { |
| 29 color: black; |
| 30 } |
| 31 |
| 32 .notUsed { |
| 33 color: red; |
| 34 } |
| 35 </style> |
| 36 |
| 37 <style> |
| 38 #not-used { |
| 39 color: red; |
| 40 } |
| 41 |
| 42 #also-used { |
| 43 color: black; |
| 44 } |
| 45 </style> |
| 46 |
| 47 <script> |
| 48 function performActions() { |
| 49 used1(); |
| 50 used2(); |
| 51 } |
| 52 |
| 53 async function test() |
| 54 { |
| 55 InspectorTest.startCoverage(); |
| 56 await InspectorTest.evaluateInPagePromise("performActions()"); |
| 57 await InspectorTest.stopCoverage(); |
| 58 await InspectorTest.dumpDecorations("gutter-html.html"); |
| 59 InspectorTest.completeTest(); |
| 60 } |
| 61 </script> |
| 62 </head> |
| 63 <body onload="runTest()"> |
| 64 <p class="used" id="also-used">Tests the coverage highlight in sources after the
recording finishes.</p> |
| 65 </body> |
| 66 </html> |
OLD | NEW |