| Index: third_party/WebKit/LayoutTests/inspector/sources/bezier-swatch-position.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector/sources/bezier-swatch-position.html b/third_party/WebKit/LayoutTests/inspector/sources/bezier-swatch-position.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e5598d996c6294ea56104e73b561f42fc93be418
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/inspector/sources/bezier-swatch-position.html
|
| @@ -0,0 +1,57 @@
|
| +<html>
|
| +<head>
|
| +
|
| +<link rel="stylesheet" href="resources/bezier.css">
|
| +
|
| +<script src="../../http/tests/inspector/inspector-test.js"></script>
|
| +<script src="../../http/tests/inspector/debugger-test.js"></script>
|
| +<script src="../../http/tests/inspector/sources-test.js"></script>
|
| +<script>
|
| +function test()
|
| +{
|
| + InspectorTest.showScriptSource("bezier.css", onSourceFrame);
|
| +
|
| + function onSourceFrame(sourceFrame)
|
| + {
|
| + InspectorTest.addResult("Initial swatch positions:");
|
| + InspectorTest.dumpSwatchPositions(sourceFrame, WebInspector.CSSSourceFrame.SwatchBookmark);
|
| +
|
| + InspectorTest.runTestSuite([
|
| + function testEditBezier(next)
|
| + {
|
| + var swatch = sourceFrame.textEditor._codeMirrorElement.querySelector("span[is=bezier-swatch]");
|
| + swatch.shadowRoot.querySelector(".bezier-swatch-icon").click();
|
| + sourceFrame._bezierEditor.setBezier(WebInspector.Geometry.CubicBezier.parse("linear"));
|
| + sourceFrame._bezierEditor._onchange();
|
| + sourceFrame._swatchPopoverHelper.hide(true)
|
| + InspectorTest.dumpSwatchPositions(sourceFrame, WebInspector.CSSSourceFrame.SwatchBookmark);
|
| + next();
|
| + },
|
| +
|
| + function testAddBezier(next)
|
| + {
|
| + var bodyLineEnd = new WebInspector.TextRange(1, 37, 1, 37);
|
| + sourceFrame.textEditor.editRange(bodyLineEnd, " transition: height 1s cubic-bezier(0, 0.5, 1, 1);");
|
| + InspectorTest.dumpSwatchPositions(sourceFrame, WebInspector.CSSSourceFrame.SwatchBookmark);
|
| + next();
|
| + },
|
| +
|
| + function testInvalidateBezier(next)
|
| + {
|
| + var startParenthesis = new WebInspector.TextRange(1, 67, 1, 68);
|
| + sourceFrame.textEditor.editRange(startParenthesis, "[");
|
| + InspectorTest.dumpSwatchPositions(sourceFrame, WebInspector.CSSSourceFrame.SwatchBookmark);
|
| + next();
|
| + }
|
| + ]);
|
| + }
|
| +}
|
| +</script>
|
| +</head>
|
| +
|
| +<body onload="runTest()">
|
| +<p>
|
| +Tests that bezier swatches are updated properly in CSS Sources.
|
| +</p>
|
| +</body>
|
| +</html>
|
|
|