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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/styles-3/style-autocomplete.html

Issue 2478563002: DevTools: Substring autocomplete in Console and StylesSideBar. (Closed)
Patch Set: upstream Created 4 years, 1 month 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script> 4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <script> 5 <script>
6 6
7 function test() 7 function test()
8 { 8 {
9 var namePrompt = new WebInspector.StylesSidebarPane.CSSPropertyPrompt(WebIns pector.cssMetadata().allProperties(), null, true); 9 var namePrompt = new WebInspector.StylesSidebarPane.CSSPropertyPrompt(WebIns pector.cssMetadata().allProperties(), null, true);
10 var valuePrompt = valuePromptFor("color"); 10 var valuePrompt = valuePromptFor("color");
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 { 49 {
50 testAgainstGolden(valuePrompt, "R", false, ["RED", "ROSYBROWN"], ["a liceblue", "inherit"], next); 50 testAgainstGolden(valuePrompt, "R", false, ["RED", "ROSYBROWN"], ["a liceblue", "inherit"], next);
51 }, 51 },
52 52
53 function testValueWithParenthesis(next) 53 function testValueWithParenthesis(next)
54 { 54 {
55 testAgainstGolden(valuePrompt, "saturate(0%)", false, [], ["inherit" ], next); 55 testAgainstGolden(valuePrompt, "saturate(0%)", false, [], ["inherit" ], next);
56 }, 56 },
57 57
58 function testValuePrefixed(next) 58 function testValuePrefixed(next)
59 { 59 {
lushnikov 2016/11/03 22:06:51 let's add some real tests?
einbinder 2016/11/03 23:12:14 Done.
60 testAgainstGolden(valuePromptFor("-webkit-transform"), "t", false, [ "translate", "translateY", "translate3d"], ["initial", "inherit"], next); 60 testAgainstGolden(valuePromptFor("-webkit-transform"), "tr", false, ["translate", "translateY", "translate3d"], ["initial", "inherit"], next);
61 }, 61 },
62 62
63 function testValueUnprefixed(next) 63 function testValueUnprefixed(next)
64 { 64 {
65 testAgainstGolden(valuePromptFor("transform"), "t", false, ["transla te", "translateY", "translate3d"], ["initial", "inherit"], next); 65 testAgainstGolden(valuePromptFor("transform"), "tr", false, ["transl ate", "translateY", "translate3d"], ["initial", "inherit"], next);
66 } 66 }
67 ]); 67 ]);
68 68
69 function testAgainstGolden(prompt, inputText, force, golden, antiGolden, cal lback) 69 function testAgainstGolden(prompt, inputText, force, golden, antiGolden, cal lback)
70 { 70 {
71 var proxyElement = document.createElement("div"); 71 var proxyElement = document.createElement("div");
72 document.body.appendChild(proxyElement); 72 document.body.appendChild(proxyElement);
73 proxyElement.style = "webkit-user-select: text; -webkit-user-modify: rea d-write-plaintext-only"; 73 proxyElement.style = "webkit-user-select: text; -webkit-user-modify: rea d-write-plaintext-only";
74 proxyElement.textContent = inputText; 74 proxyElement.textContent = inputText;
75 var selectionRange = document.createRange(); 75 var selectionRange = document.createRange();
(...skipping 25 matching lines...) Expand all
101 } 101 }
102 </script> 102 </script>
103 </head> 103 </head>
104 104
105 <body onload="runTest()"> 105 <body onload="runTest()">
106 <p> 106 <p>
107 Tests that autocompletions are computed correctly when editing the Styles pane. 107 Tests that autocompletions are computed correctly when editing the Styles pane.
108 </p> 108 </p>
109 </body> 109 </body>
110 </html> 110 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698