1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 03:57:58 +01:00

Back out most of the changes accidentally merged from key-processing.

--HG--
extra : rebase_source : a00510584f7e13917f8496e15b7dd36852d98ea7
This commit is contained in:
Kris Maglione
2011-01-27 15:12:33 -05:00
parent 2c3fd51812
commit d16c0b0d06
47 changed files with 9350 additions and 1141 deletions

View File

@@ -0,0 +1,42 @@
var dactyllib = require("dactyl");
const FIND_TEST_PAGE = collector.addHttpResource("./data/") + "find.html";
var setupModule = function (module) {
controller = mozmill.getBrowserController();
dactyl = new dactyllib.Controller(controller);
};
var setupTest = function (test) {
controller.open(FIND_TEST_PAGE);
controller.waitForPageLoad(controller.tabs.activeTab);
};
var testFindCommand_PresentAlphabeticText_TextSelected = function () {
assertTextFoundInPage("letter")
};
var testFindCommand_PresentNumericText_TextSelected = function () {
assertTextFoundInPage("3.141")
};
var testFindCommand_MissingText_ErrorMessageDisplayed = function () {
const MISSING_TEXT = "8c307545a017f60add90ef08955e148e";
const PATTERN_NOT_FOUND_ERROR = "E486: Pattern not found: " + MISSING_TEXT;
runTextSearchCommand(MISSING_TEXT);
dactyl.assertErrorMessage(PATTERN_NOT_FOUND_ERROR);
};
function runTextSearchCommand(str) {
dactyl.runViCommand("/" + str);
dactyl.runViCommand([["VK_RETURN"]]);
}
function assertTextFoundInPage(text) {
runTextSearchCommand(text);
dactyl.assertSelection(text);
}
// vim: sw=4 ts=8 et: