| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <link rel="stylesheet" href="../styles/resources/disable-property-workingcopy-up
date.css"> | 3 <link rel="stylesheet" href="../styles/resources/disable-property-workingcopy-up
date.css"> |
| 4 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 4 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 6 <script src="../../../http/tests/inspector/elements-test.js"></script> | 6 <script src="../../../http/tests/inspector/elements-test.js"></script> |
| 7 <script> | 7 <script> |
| 8 | 8 |
| 9 function test() | 9 function test() |
| 10 { | 10 { |
| 11 var cssSourceFrame; | 11 var cssSourceFrame; |
| 12 WebInspector.StylesSourceMapping.MinorChangeUpdateTimeoutMs = 10; | 12 Bindings.StylesSourceMapping.MinorChangeUpdateTimeoutMs = 10; |
| 13 | 13 |
| 14 InspectorTest.runTestSuite([ | 14 InspectorTest.runTestSuite([ |
| 15 function selectContainer(next) | 15 function selectContainer(next) |
| 16 { | 16 { |
| 17 InspectorTest.selectNodeAndWaitForStyles("inspected", next); | 17 InspectorTest.selectNodeAndWaitForStyles("inspected", next); |
| 18 }, | 18 }, |
| 19 | 19 |
| 20 function showEditor(next) | 20 function showEditor(next) |
| 21 { | 21 { |
| 22 var headers = InspectorTest.cssModel.styleSheetHeaders(); | 22 var headers = InspectorTest.cssModel.styleSheetHeaders(); |
| 23 for (var i = 0; i < headers.length; ++i) { | 23 for (var i = 0; i < headers.length; ++i) { |
| 24 if (headers[i].sourceURL.endsWith(".css")) { | 24 if (headers[i].sourceURL.endsWith(".css")) { |
| 25 var cssLocation = new WebInspector.CSSLocation(headers[i], 0
); | 25 var cssLocation = new SDK.CSSLocation(headers[i], 0); |
| 26 InspectorTest.showUISourceCode(WebInspector.cssWorkspaceBind
ing.rawLocationToUILocation(cssLocation).uiSourceCode, callback); | 26 InspectorTest.showUISourceCode(Bindings.cssWorkspaceBinding.
rawLocationToUILocation(cssLocation).uiSourceCode, callback); |
| 27 break; | 27 break; |
| 28 } | 28 } |
| 29 } | 29 } |
| 30 | 30 |
| 31 function callback(sourceFrame) | 31 function callback(sourceFrame) |
| 32 { | 32 { |
| 33 cssSourceFrame = sourceFrame; | 33 cssSourceFrame = sourceFrame; |
| 34 InspectorTest.dumpSourceFrameContents(cssSourceFrame); | 34 InspectorTest.dumpSourceFrameContents(cssSourceFrame); |
| 35 next(); | 35 next(); |
| 36 } | 36 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 56 function dumpEnabledText(next) | 56 function dumpEnabledText(next) |
| 57 { | 57 { |
| 58 InspectorTest.dumpSourceFrameContents(cssSourceFrame); | 58 InspectorTest.dumpSourceFrameContents(cssSourceFrame); |
| 59 InspectorTest.dumpSelectedElementStyles(true); | 59 InspectorTest.dumpSelectedElementStyles(true); |
| 60 next(); | 60 next(); |
| 61 } | 61 } |
| 62 ]); | 62 ]); |
| 63 | 63 |
| 64 function toggleProperty(value, next) | 64 function toggleProperty(value, next) |
| 65 { | 65 { |
| 66 InspectorTest.addSniffer(WebInspector.UISourceCode.prototype, "addRevisi
on", callback); | 66 InspectorTest.addSniffer(Workspace.UISourceCode.prototype, "addRevision"
, callback); |
| 67 InspectorTest.waitForStyles("inspected", callback); | 67 InspectorTest.waitForStyles("inspected", callback); |
| 68 InspectorTest.toggleMatchedStyleProperty("font-weight", value); | 68 InspectorTest.toggleMatchedStyleProperty("font-weight", value); |
| 69 | 69 |
| 70 var barrierCounter = 2; | 70 var barrierCounter = 2; |
| 71 function callback() | 71 function callback() |
| 72 { | 72 { |
| 73 if (!--barrierCounter) | 73 if (!--barrierCounter) |
| 74 next(); | 74 next(); |
| 75 } | 75 } |
| 76 } | 76 } |
| 77 } | 77 } |
| 78 </script> | 78 </script> |
| 79 </head> | 79 </head> |
| 80 | 80 |
| 81 <body onload="runTest()"> | 81 <body onload="runTest()"> |
| 82 <p> | 82 <p> |
| 83 Tests that style property disablement is propagated into the stylesheet UISource
Code working copy. | 83 Tests that style property disablement is propagated into the stylesheet UISource
Code working copy. |
| 84 </p> | 84 </p> |
| 85 | 85 |
| 86 <div id="inspected"> | 86 <div id="inspected"> |
| 87 </div> | 87 </div> |
| 88 | 88 |
| 89 </body> | 89 </body> |
| 90 </html> | 90 </html> |
| OLD | NEW |