mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 963925: added test for Highlight All mode. r=Unfocused
This commit is contained in:
parent
e3a0ee0c2d
commit
0e5f25dbaa
@ -91,6 +91,9 @@
|
||||
testQuickFindText();
|
||||
gFindBar.close();
|
||||
ok(gFindBar.hidden, "Failed to close findbar after testQuickFindText");
|
||||
testFindWithHighlight();
|
||||
gFindBar.close();
|
||||
ok(gFindBar.hidden, "Failed to close findbar after testFindWithHighlight");
|
||||
testFindbarSelection();
|
||||
testDrop();
|
||||
testQuickFindLink();
|
||||
@ -304,6 +307,52 @@
|
||||
"testQuickFindLink: failed to find sample link");
|
||||
}
|
||||
|
||||
// See bug 963925 for more details on this test.
|
||||
function testFindWithHighlight() {
|
||||
//clearFocus();
|
||||
gFindBar._findField.value = "";
|
||||
|
||||
let findCommand = document.getElementById("cmd_find");
|
||||
findCommand.doCommand();
|
||||
|
||||
let searchStr = "e";
|
||||
enterStringIntoFindField(searchStr);
|
||||
|
||||
let a = gFindBar._findField.value;
|
||||
let b = gFindBar._browser.finder._fastFind.searchString;
|
||||
let c = gFindBar._browser.finder.searchString;
|
||||
ok(a == b && b == c, "testFindWithHighlight: " + a + ", " + b + ", " + c + ".");
|
||||
|
||||
let oldGetInitialSelection = gFindBar._getInitialSelection;
|
||||
let searchStr = "t";
|
||||
gFindBar._getInitialSelection = () => searchStr;
|
||||
findCommand.doCommand();
|
||||
gFindBar._getInitialSelection = oldGetInitialSelection;
|
||||
|
||||
a = gFindBar._findField.value;
|
||||
b = gFindBar._browser.finder._fastFind.searchString;
|
||||
c = gFindBar._browser.finder.searchString;
|
||||
ok(a == searchStr && b == c, "testFindWithHighlight: " + a + ", " + b + ", " + c + ".");
|
||||
|
||||
let highlightButton = gFindBar.getElement("highlight");
|
||||
highlightButton.click();
|
||||
ok(highlightButton.checked, "testFindWithHighlight: Highlight All should be checked.");
|
||||
|
||||
a = gFindBar._findField.value;
|
||||
b = gFindBar._browser.finder._fastFind.searchString;
|
||||
c = gFindBar._browser.finder.searchString;
|
||||
ok(a == searchStr && b == c, "testFindWithHighlight: " + a + ", " + b + ", " + c + ".");
|
||||
|
||||
gFindBar.onFindAgainCommand();
|
||||
a = gFindBar._findField.value;
|
||||
b = gFindBar._browser.finder._fastFind.searchString;
|
||||
c = gFindBar._browser.finder.searchString;
|
||||
ok(a == b && b == c, "testFindWithHighlight: " + a + ", " + b + ", " + c + ".");
|
||||
|
||||
highlightButton.click();
|
||||
ok(!highlightButton.checked, "testFindWithHighlight: Highlight All should be unchecked.");
|
||||
}
|
||||
|
||||
function testQuickFindText() {
|
||||
clearFocus();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user