mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 20:47:44 +00:00
4bd38f2535
--HG-- rename : services/sync/tps/chrome.manifest => services/sync/tps/extensions/tps/chrome.manifest rename : services/sync/tps/components/tps-cmdline.js => services/sync/tps/extensions/tps/components/tps-cmdline.js rename : services/sync/tps/install.rdf => services/sync/tps/extensions/tps/install.rdf rename : services/sync/tps/modules/bookmarks.jsm => services/sync/tps/extensions/tps/modules/bookmarks.jsm rename : services/sync/tps/modules/forms.jsm => services/sync/tps/extensions/tps/modules/forms.jsm rename : services/sync/tps/modules/history.jsm => services/sync/tps/extensions/tps/modules/history.jsm rename : services/sync/tps/modules/logger.jsm => services/sync/tps/extensions/tps/modules/logger.jsm rename : services/sync/tps/modules/passwords.jsm => services/sync/tps/extensions/tps/modules/passwords.jsm rename : services/sync/tps/modules/prefs.jsm => services/sync/tps/extensions/tps/modules/prefs.jsm rename : services/sync/tps/modules/quit.js => services/sync/tps/extensions/tps/modules/quit.js rename : services/sync/tps/modules/tabs.jsm => services/sync/tps/extensions/tps/modules/tabs.jsm rename : services/sync/tps/modules/tps.jsm => services/sync/tps/extensions/tps/modules/tps.jsm extra : rebase_source : d4eed9a707ffe801de9b1bb4e6f08d31e670eec4
54 lines
2.7 KiB
JavaScript
54 lines
2.7 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
var jum = {}; Components.utils.import('resource://mozmill/modules/jum.js', jum);
|
|
|
|
var setupModule = function(module) {
|
|
module.controller = mozmill.getBrowserController();
|
|
};
|
|
|
|
var testGetNode = function() {
|
|
controller.open("about:support");
|
|
controller.waitForPageLoad();
|
|
|
|
var appbox = new elementslib.ID(controller.tabs.activeTab, "application-box");
|
|
jum.assert(appbox.getNode().innerHTML == 'Firefox', 'correct app name');
|
|
};
|
|
|
|
const NAV_BAR = '/id("main-window")/id("tab-view-deck")/{"flex":"1"}' +
|
|
'/id("navigator-toolbox")/id("nav-bar")';
|
|
const SEARCH_BAR = NAV_BAR + '/id("search-container")/id("searchbar")';
|
|
const SEARCH_TEXTBOX = SEARCH_BAR + '/anon({"anonid":"searchbar-textbox"})';
|
|
const SEARCH_DROPDOWN = SEARCH_TEXTBOX + '/[0]/anon({"anonid":"searchbar-engine-button"})';
|
|
const SEARCH_POPUP = SEARCH_DROPDOWN + '/anon({"anonid":"searchbar-popup"})';
|
|
const SEARCH_INPUT = SEARCH_TEXTBOX + '/anon({"class":"autocomplete-textbox-container"})' +
|
|
'/anon({"anonid":"textbox-input-box"})' +
|
|
'/anon({"anonid":"input"})';
|
|
const SEARCH_CONTEXT = SEARCH_TEXTBOX + '/anon({"anonid":"textbox-input-box"})' +
|
|
'/anon({"anonid":"input-box-contextmenu"})';
|
|
const SEARCH_GO_BUTTON = SEARCH_TEXTBOX + '/anon({"class":"search-go-container"})' +
|
|
'/anon({"class":"search-go-button"})';
|
|
const SEARCH_AUTOCOMPLETE = '/id("main-window")/id("mainPopupSet")/id("PopupAutoComplete")';
|
|
|
|
var testLookupExpressions = function() {
|
|
var item;
|
|
item = new elementslib.Lookup(controller.window.document, NAV_BAR);
|
|
controller.click(item);
|
|
item = new elementslib.Lookup(controller.window.document, SEARCH_BAR);
|
|
controller.click(item);
|
|
item = new elementslib.Lookup(controller.window.document, SEARCH_TEXTBOX);
|
|
controller.click(item);
|
|
item = new elementslib.Lookup(controller.window.document, SEARCH_DROPDOWN);
|
|
controller.click(item);
|
|
item = new elementslib.Lookup(controller.window.document, SEARCH_POPUP);
|
|
controller.click(item);
|
|
item = new elementslib.Lookup(controller.window.document, SEARCH_INPUT);
|
|
controller.click(item);
|
|
item = new elementslib.Lookup(controller.window.document, SEARCH_CONTEXT);
|
|
controller.click(item);
|
|
item = new elementslib.Lookup(controller.window.document, SEARCH_GO_BUTTON);
|
|
controller.click(item);
|
|
item = new elementslib.Lookup(controller.window.document, SEARCH_AUTOCOMPLETE);
|
|
controller.click(item);
|
|
};
|