OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../inspector-test.js"></script> | 3 <script src="../../inspector-test.js"></script> |
4 <script src="../../elements-test.js"></script> | 4 <script src="../../elements-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 function addStylesheet() | 7 function addStylesheet() |
8 { | 8 { |
9 var linkElement = document.createElement("link"); | 9 var linkElement = document.createElement("link"); |
10 linkElement.rel = "stylesheet"; | 10 linkElement.rel = "stylesheet"; |
11 linkElement.href = "resources/selector-line-sourcemap-header-deprecated.php"
; | 11 linkElement.href = "resources/selector-line-sourcemap-header-deprecated.php"
; |
12 document.head.appendChild(linkElement); | 12 document.head.appendChild(linkElement); |
13 } | 13 } |
14 | 14 |
15 function test() | 15 function test() |
16 { | 16 { |
17 WebInspector.settings.cssSourceMapsEnabled.get = function() { return true; } | 17 WebInspector.settings.cssSourceMapsEnabled.get = function() { return true; } |
18 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Sty
leSheetAdded, step1, this); | 18 InspectorTest.addSniffer(WebInspector.SASSSourceMapping.prototype, "_bindUIS
ourceCode", step1); |
19 InspectorTest.evaluateInPage("addStylesheet()"); | 19 InspectorTest.evaluateInPage("addStylesheet()"); |
20 | 20 |
21 function step1() | 21 function step1() |
22 { | 22 { |
23 WebInspector.inspectorView.showPanel("elements"); | 23 WebInspector.inspectorView.showPanel("elements"); |
24 InspectorTest.selectNodeAndWaitForStyles("inspected", step2); | 24 InspectorTest.selectNodeAndWaitForStyles("inspected", step2); |
25 } | 25 } |
26 | 26 |
27 function step2() | 27 function step2() |
28 { | 28 { |
29 InspectorTest.dumpSelectedElementStyles(true); | 29 InspectorTest.dumpSelectedElementStyles(true); |
30 InspectorTest.completeTest(); | 30 InspectorTest.completeTest(); |
31 } | 31 } |
32 } | 32 } |
33 | 33 |
34 </script> | 34 </script> |
35 </head> | 35 </head> |
36 | 36 |
37 <body onload="runTest()"> | 37 <body onload="runTest()"> |
38 <p> | 38 <p> |
39 Tests that sourcemap is applied correctly when specified by the respective HTTP
header. | 39 Tests that sourcemap is applied correctly when specified by the respective HTTP
header. |
40 </p> | 40 </p> |
41 | 41 |
42 <div id="container"> | 42 <div id="container"> |
43 <div id="inspected">Text</div> | 43 <div id="inspected">Text</div> |
44 </div> | 44 </div> |
45 | 45 |
46 </body> | 46 </body> |
47 </html> | 47 </html> |
OLD | NEW |