Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update tests after issue 5594

  • Loading branch information...
commit 8b0eb322de80c805ac8459ce6593985c3f5c7789 1 parent d90124a
Simon Lindholm simonlindholm authored
9 tests/content/console/completion/5493/issue5493.html
View
@@ -7,7 +7,7 @@
<script>
var obj = {
AbcD: 1,
- aBcde: 1
+ aBcdE: 1
};
</script>
</head>
@@ -23,9 +23,10 @@
<li>Verify the following completions by typing the prefix and pressing <span class="key">TAB</span>:</li>
<ul>
<li>"obj.A" <span class="ok">&rArr; "obj.AbcD"</span></li>
- <li>"obj.a" <span class="ok">&rArr; "obj.aBcde"</span></li>
+ <li>"obj.a" <span class="ok">&rArr; "obj.aBcdE"</span></li>
<li>"obj.AB" <span class="ok">&rArr; "obj.AB"</span></li>
- <li>"obj.ab" <span class="ok">&rArr; "obj.AbcD"</span></li>
+ <li>"obj.ab" <span class="ok">&rArr; "obj.aBdeE"</span></li>
+ <li>"obj.abx&lt;backspace&gt;" <span class="ok">&rArr; "obj.AbcD"</span></li>
<li>"obj.Abcd" <span class="ok">&rArr; "obj.AbcD"</span></li>
</ul>
<li>Verify that when typing " obj.ab", the completion text starts
@@ -36,6 +37,8 @@
<li>Case-insensitive matches should appear as completions.</li>
<li>Typed capital letters should force case at those points.</li>
<li>Completions that match case should be preferred as defaults.</li>
+ <li>When typing another letter, the completion should remain unless
+ another completion suddenly appears better at matching case.</li>
</ul>
</section>
<footer>
17 tests/content/console/completion/5493/issue5493.js
View
@@ -25,8 +25,14 @@ function runTest()
{
cmdLine.value = "";
FBTest.typeCommand(expr);
+ var desc = expr;
+ if (expr.slice(-1) === "x")
+ {
+ FBTest.synthesizeKey("VK_BACK_SPACE", null, win);
+ desc += "<backspace>";
+ }
FBTest.synthesizeKey("VK_TAB", null, win);
- FBTest.compare(wanted, cmdLine.value, "Completing \"" + expr + "\"\"" + wanted + "\"");
+ FBTest.compare(wanted, cmdLine.value, "Completing \"" + desc + "\"\"" + wanted + "\"");
callback();
}
@@ -34,13 +40,13 @@ function runTest()
{
cmdLine.value = "";
FBTest.typeCommand(" obj.ab");
- FBTest.compare(" obj.abcD", completionBox.value,
+ FBTest.compare(" obj.abcdE", completionBox.value,
"Completion box should retain the exact prefix");
waitForOpen(function()
{
var el = popup.querySelector("div[selected=true]");
FBTest.ok(el, "The completion popup should open, with something selected");
- FBTest.compare(" obj.AbcD", el.textContent,
+ FBTest.compare(" obj.aBcdE", el.textContent,
"Completion popup should show the case of the completion");
callback();
});
@@ -48,9 +54,10 @@ function runTest()
var tests = [
["A", "AbcD"],
- ["a", "aBcde"],
+ ["a", "aBcdE"],
["AB", "AB"],
- ["ab", "AbcD"],
+ ["ab", "aBcdE"],
+ ["abx", "AbcD"],
["Abcd", "AbcD"]
];
Please sign in to comment.
Something went wrong with that request. Please try again.