| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 | 3 |
| 4 <link rel="stylesheet" href="resources/bezier.css"> | 4 <link rel="stylesheet" href="resources/bezier.css"> |
| 5 | 5 |
| 6 <script src="../../http/tests/inspector/inspector-test.js"></script> | 6 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 7 <script src="../../http/tests/inspector/debugger-test.js"></script> | 7 <script src="../../http/tests/inspector/debugger-test.js"></script> |
| 8 <script src="../../http/tests/inspector/sources-test.js"></script> | 8 <script src="../../http/tests/inspector/sources-test.js"></script> |
| 9 <script> | 9 <script> |
| 10 function test() | 10 function test() |
| 11 { | 11 { |
| 12 InspectorTest.showScriptSource("bezier.css", onSourceFrame); | 12 InspectorTest.showScriptSource("bezier.css", onSourceFrame); |
| 13 | 13 |
| 14 function onSourceFrame(sourceFrame) | 14 function onSourceFrame(sourceFrame) |
| 15 { | 15 { |
| 16 InspectorTest.addResult("Initial swatch positions:"); | 16 InspectorTest.addResult("Initial swatch positions:"); |
| 17 InspectorTest.dumpSwatchPositions(sourceFrame, Sources.CSSSourceFrame.Sw
atchBookmark); | 17 InspectorTest.dumpSwatchPositions(sourceFrame, Sources.CSSSourceFrame.Sw
atchBookmark); |
| 18 | 18 |
| 19 InspectorTest.runTestSuite([ | 19 InspectorTest.runTestSuite([ |
| 20 function testEditBezier(next) | 20 function testEditBezier(next) |
| 21 { | 21 { |
| 22 var swatch = sourceFrame.textEditor._codeMirrorElement.querySele
ctor("span[is=bezier-swatch]"); | 22 var swatch = sourceFrame.textEditor._codeMirrorElement.querySele
ctor("span[is=bezier-swatch]"); |
| 23 swatch.shadowRoot.querySelector(".bezier-swatch-icon").click(); | 23 swatch.shadowRoot.querySelector(".bezier-swatch-icon").click(); |
| 24 sourceFrame._bezierEditor.setBezier(Common.Geometry.CubicBezier.
parse("linear")); | 24 sourceFrame._bezierEditor.setBezier(UI.Geometry.CubicBezier.pars
e("linear")); |
| 25 sourceFrame._bezierEditor._onchange(); | 25 sourceFrame._bezierEditor._onchange(); |
| 26 sourceFrame._swatchPopoverHelper.hide(true) | 26 sourceFrame._swatchPopoverHelper.hide(true) |
| 27 InspectorTest.dumpSwatchPositions(sourceFrame, Sources.CSSSource
Frame.SwatchBookmark); | 27 InspectorTest.dumpSwatchPositions(sourceFrame, Sources.CSSSource
Frame.SwatchBookmark); |
| 28 next(); | 28 next(); |
| 29 }, | 29 }, |
| 30 | 30 |
| 31 function testAddBezier(next) | 31 function testAddBezier(next) |
| 32 { | 32 { |
| 33 var bodyLineEnd = new Common.TextRange(1, 37, 1, 37); | 33 var bodyLineEnd = new Common.TextRange(1, 37, 1, 37); |
| 34 sourceFrame.textEditor.editRange(bodyLineEnd, " transition: heig
ht 1s cubic-bezier(0, 0.5, 1, 1);"); | 34 sourceFrame.textEditor.editRange(bodyLineEnd, " transition: heig
ht 1s cubic-bezier(0, 0.5, 1, 1);"); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 48 } | 48 } |
| 49 </script> | 49 </script> |
| 50 </head> | 50 </head> |
| 51 | 51 |
| 52 <body onload="runTest()"> | 52 <body onload="runTest()"> |
| 53 <p> | 53 <p> |
| 54 Tests that bezier swatches are updated properly in CSS Sources. | 54 Tests that bezier swatches are updated properly in CSS Sources. |
| 55 </p> | 55 </p> |
| 56 </body> | 56 </body> |
| 57 </html> | 57 </html> |
| OLD | NEW |