Index: LayoutTests/inspector/elements/styles/style-autocomplete.html |
diff --git a/LayoutTests/inspector/elements/styles/style-autocomplete.html b/LayoutTests/inspector/elements/styles/style-autocomplete.html |
deleted file mode 100644 |
index c45c7b9e04ee7bf660517c16189115909b0c7138..0000000000000000000000000000000000000000 |
--- a/LayoutTests/inspector/elements/styles/style-autocomplete.html |
+++ /dev/null |
@@ -1,111 +0,0 @@ |
-<html> |
-<head> |
-<script src="../../../http/tests/inspector/inspector-test.js"></script> |
-<script src="../../../http/tests/inspector/elements-test.js"></script> |
-<script> |
- |
-function test() |
-{ |
- |
- var namePrompt = new WebInspector.StylesSidebarPane.CSSPropertyPrompt(WebInspector.CSSMetadata.cssPropertiesMetainfo, null, true); |
- var valuePrompt = valuePromptFor("color"); |
- |
- function valuePromptFor(name) |
- { |
- return new WebInspector.StylesSidebarPane.CSSPropertyPrompt(WebInspector.CSSMetadata.keywordsForProperty(name), null, false); |
- } |
- |
- InspectorTest.runTestSuite([ |
- function testEmptyName(next) |
- { |
- testAgainstGolden(namePrompt, "", false, [], ["width"], next); |
- }, |
- |
- function testEmptyNameForce(next) |
- { |
- testAgainstGolden(namePrompt, "", true, ["width"], [], next); |
- }, |
- |
- function testSingleCharName(next) |
- { |
- testAgainstGolden(namePrompt, "w", false, ["width"], [], next); |
- }, |
- |
- function testEmptyValue(next) |
- { |
- testAgainstGolden(valuePrompt, "", false, ["aliceblue", "red", "inherit"], [], next); |
- }, |
- |
- function testImportantDeclarationDoNotToggleOnExclamationMark(next) |
- { |
- testAgainstGolden(valuePrompt, "red !", false, [], ["!important"], next); |
- }, |
- |
- function testImportantDeclaration(next) |
- { |
- testAgainstGolden(valuePrompt, "red !i", false, ["!important"], [], next); |
- }, |
- |
- function testValueR(next) |
- { |
- testAgainstGolden(valuePrompt, "R", false, ["RED", "ROSYBROWN"], ["aliceblue", "inherit"], next); |
- }, |
- |
- function testValueWithParenthesis(next) |
- { |
- testAgainstGolden(valuePrompt, "saturate(0%)", false, [], ["inherit"], next); |
- }, |
- |
- function testValuePrefixed(next) |
- { |
- testAgainstGolden(valuePromptFor("-webkit-transform"), "t", false, ["translate", "translateY", "translate3d"], ["initial", "inherit"], next); |
- }, |
- |
- function testValueUnprefixed(next) |
- { |
- testAgainstGolden(valuePromptFor("transform"), "t", false, ["translate", "translateY", "translate3d"], ["initial", "inherit"], next); |
- } |
- ]); |
- |
- function testAgainstGolden(prompt, inputText, force, golden, antiGolden, callback) |
- { |
- var proxyElement = document.createElement("div"); |
- document.body.appendChild(proxyElement); |
- proxyElement.style = "webkit-user-select: text; -webkit-user-modify: read-write-plaintext-only"; |
- proxyElement.textContent = inputText; |
- var selectionRange = document.createRange(); |
- var textNode = proxyElement.childNodes[0]; |
- if (textNode) { |
- selectionRange.setStart(textNode, inputText.length); |
- selectionRange.setEnd(textNode, inputText.length); |
- } else { |
- selectionRange.selectNodeContents(proxyElement); |
- } |
- var range = selectionRange.startContainer.rangeOfWord(selectionRange.startOffset, prompt._completionStopCharacters, proxyElement, "backward"); |
- prompt._buildPropertyCompletions(proxyElement, range, force, completions); |
- |
- function completions(result, index) |
- { |
- var i; |
- for (i = 0; i < golden.length; ++i) { |
- if (result.indexOf(golden[i]) === -1) |
- InspectorTest.addResult("NOT FOUND: " + golden[i]); |
- } |
- for (i = 0; i < antiGolden.length; ++i) { |
- if (result.indexOf(antiGolden[i]) !== -1) |
- InspectorTest.addResult("FOUND: " + antiGolden[i]); |
- } |
- proxyElement.remove(); |
- callback(); |
- } |
- } |
-} |
-</script> |
-</head> |
- |
-<body onload="runTest()"> |
-<p> |
-Tests that autocompletions are computed correctly when editing the Styles pane. |
-</p> |
-</body> |
-</html> |