Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/bezier-swatch-position.html

Issue 2297873004: DevTools: Add bezier swatches to CSS Sources (Closed)
Patch Set: Extract dumpSwatchPositions and rename flag Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3
4 <link rel="stylesheet" href="resources/bezier.css">
5
6 <script src="../../http/tests/inspector/inspector-test.js"></script>
7 <script src="../../http/tests/inspector/debugger-test.js"></script>
8 <script src="../../http/tests/inspector/sources-test.js"></script>
9 <script>
10 function test()
11 {
12 InspectorTest.showScriptSource("bezier.css", onSourceFrame);
13
14 function onSourceFrame(sourceFrame)
15 {
16 InspectorTest.addResult("Initial swatch positions:");
17 InspectorTest.dumpSwatchPositions(sourceFrame, WebInspector.CSSSourceFra me.SwatchBookmark);
18
19 InspectorTest.runTestSuite([
20 function testEditBezier(next)
21 {
22 var swatch = sourceFrame.textEditor._codeMirrorElement.querySele ctor("span[is=bezier-swatch]");
23 swatch.shadowRoot.querySelector(".bezier-swatch-icon").click();
24 sourceFrame._bezierEditor.setBezier(WebInspector.Geometry.CubicB ezier.parse("linear"));
25 sourceFrame._bezierEditor._onchange();
26 sourceFrame._swatchPopoverHelper.hide(true)
27 InspectorTest.dumpSwatchPositions(sourceFrame, WebInspector.CSSS ourceFrame.SwatchBookmark);
28 next();
29 },
30
31 function testAddBezier(next)
32 {
33 var bodyLineEnd = new WebInspector.TextRange(1, 37, 1, 37);
34 sourceFrame.textEditor.editRange(bodyLineEnd, " transition: heig ht 1s cubic-bezier(0, 0.5, 1, 1);");
35 InspectorTest.dumpSwatchPositions(sourceFrame, WebInspector.CSSS ourceFrame.SwatchBookmark);
36 next();
37 },
38
39 function testInvalidateBezier(next)
40 {
41 var startParenthesis = new WebInspector.TextRange(1, 67, 1, 68);
42 sourceFrame.textEditor.editRange(startParenthesis, "[");
43 InspectorTest.dumpSwatchPositions(sourceFrame, WebInspector.CSSS ourceFrame.SwatchBookmark);
44 next();
45 }
46 ]);
47 }
48 }
49 </script>
50 </head>
51
52 <body onload="runTest()">
53 <p>
54 Tests that bezier swatches are updated properly in CSS Sources.
55 </p>
56 </body>
57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698