| 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 <link rel="stylesheet" href="resources/style-formatter-obfuscated.css"> | 5 <link rel="stylesheet" href="resources/style-formatter-obfuscated.css"> |
| 6 | 6 |
| 7 <script> | 7 <script> |
| 8 async function test() | 8 async function test() |
| 9 { | 9 { |
| 10 var uiSourceCode = await InspectorTest.waitForUISourceCode("style-formatter-
obfuscated.css"); | 10 var uiSourceCode = await InspectorTest.waitForUISourceCode("style-formatter-
obfuscated.css"); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 InspectorTest.addResult("Location mapping without formatted source:"); | 35 InspectorTest.addResult("Location mapping without formatted source:"); |
| 36 dumpLocations(); | 36 dumpLocations(); |
| 37 | 37 |
| 38 InspectorTest.completeTest(); | 38 InspectorTest.completeTest(); |
| 39 | 39 |
| 40 function dumpLocations() { | 40 function dumpLocations() { |
| 41 InspectorTest.addResult("Mapped locations:"); | 41 InspectorTest.addResult("Mapped locations:"); |
| 42 for (var rawLocation of rawLocations) { | 42 for (var rawLocation of rawLocations) { |
| 43 var uiLocation = Bindings.cssWorkspaceBinding.rawLocationToUILocation(ra
wLocation); | 43 var uiLocation = Bindings.cssWorkspaceBinding.rawLocationToUILocation(ra
wLocation); |
| 44 InspectorTest.addResult(`${rawLocation.lineNumber}:${rawLocation.columnN
umber} -> ${uiLocation.lineNumber}:${uiLocation.columnNumber}`); | 44 var reverseRawLocation = Bindings.cssWorkspaceBinding.uiLocationToRawLoc
ations(uiLocation)[0]; |
| 45 InspectorTest.addResult(`${rawLocation.lineNumber}:${rawLocation.columnN
umber} -> ${uiLocation.lineNumber}:${uiLocation.columnNumber} ` + |
| 46 `-> ${reverseRawLocation.lineNumber}:${reverseRawLocation.columnNumb
er}`); |
| 45 } | 47 } |
| 46 InspectorTest.addResult(`Live locations (updated: ${locationUpdateCount}):
`); | 48 InspectorTest.addResult(`Live locations (updated: ${locationUpdateCount}):
`); |
| 47 for (var liveLocation of liveLocations) { | 49 for (var liveLocation of liveLocations) { |
| 48 var uiLocation = liveLocation.uiLocation(); | 50 var uiLocation = liveLocation.uiLocation(); |
| 49 InspectorTest.addResult(`${uiLocation.lineNumber}:${uiLocation.columnNum
ber}`); | 51 InspectorTest.addResult(`${uiLocation.lineNumber}:${uiLocation.columnNum
ber}`); |
| 50 } | 52 } |
| 51 } | 53 } |
| 52 } | 54 } |
| 53 </script> | 55 </script> |
| 54 | 56 |
| 55 </head> | 57 </head> |
| 56 <body onload="runTest()"> | 58 <body onload="runTest()"> |
| 57 <p>Tests how SourceFormatter handles CSS sources</p> | 59 <p>Tests how SourceFormatter handles CSS sources</p> |
| 58 </body> | 60 </body> |
| 59 </html> | 61 </html> |
| OLD | NEW |