mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
c7edae7f0f
--HG-- rename : testing/mozmill/jsbridge-2.4.0/MANIFEST.in => testing/mozmill/jsbridge/MANIFEST.in rename : testing/mozmill/jsbridge-2.4.0/jsbridge/__init__.py => testing/mozmill/jsbridge/jsbridge/__init__.py rename : testing/mozmill/jsbridge-2.4.0/jsbridge/extension/chrome.manifest => testing/mozmill/jsbridge/jsbridge/extension/chrome.manifest rename : testing/mozmill/jsbridge-2.4.0/jsbridge/extension/chrome/content/overlay.js => testing/mozmill/jsbridge/jsbridge/extension/chrome/content/overlay.js rename : testing/mozmill/jsbridge-2.4.0/jsbridge/extension/chrome/content/overlay.xul => testing/mozmill/jsbridge/jsbridge/extension/chrome/content/overlay.xul rename : testing/mozmill/jsbridge-2.4.0/jsbridge/extension/components/cmdarg.js => testing/mozmill/jsbridge/jsbridge/extension/components/cmdarg.js rename : testing/mozmill/jsbridge-2.4.0/jsbridge/extension/install.rdf => testing/mozmill/jsbridge/jsbridge/extension/install.rdf rename : testing/mozmill/jsbridge-2.4.0/jsbridge/extension/resource/modules/events.js => testing/mozmill/jsbridge/jsbridge/extension/resource/modules/events.js rename : testing/mozmill/jsbridge-2.4.0/jsbridge/extension/resource/modules/init.js => testing/mozmill/jsbridge/jsbridge/extension/resource/modules/init.js rename : testing/mozmill/jsbridge-2.4.0/jsbridge/extension/resource/modules/json2.js => testing/mozmill/jsbridge/jsbridge/extension/resource/modules/json2.js rename : testing/mozmill/jsbridge-2.4.0/jsbridge/extension/resource/modules/server.js => testing/mozmill/jsbridge/jsbridge/extension/resource/modules/server.js rename : testing/mozmill/jsbridge-2.4.0/jsbridge/jsobjects.py => testing/mozmill/jsbridge/jsbridge/jsobjects.py rename : testing/mozmill/jsbridge-2.4.0/jsbridge/network.py => testing/mozmill/jsbridge/jsbridge/network.py rename : testing/mozmill/jsbridge-2.4.0/setup.py => testing/mozmill/jsbridge/setup.py rename : testing/mozmill/mozmill-1.5.0/MANIFEST.in => testing/mozmill/mozmill/MANIFEST.in rename : testing/mozmill/mozmill-1.5.0/docs/Makefile => testing/mozmill/mozmill/docs/Makefile rename : testing/mozmill/mozmill-1.5.0/docs/_build/doctrees/environment.pickle => testing/mozmill/mozmill/docs/_build/doctrees/environment.pickle rename : testing/mozmill/mozmill-1.5.0/docs/_build/doctrees/index.doctree => testing/mozmill/mozmill/docs/_build/doctrees/index.doctree rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/_sources/index.txt => testing/mozmill/mozmill/docs/_build/html/_sources/index.txt rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/_static/contents.png => testing/mozmill/mozmill/docs/_build/html/_static/contents.png rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/_static/default.css => testing/mozmill/mozmill/docs/_build/html/_static/default.css rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/_static/doctools.js => testing/mozmill/mozmill/docs/_build/html/_static/doctools.js rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/_static/file.png => testing/mozmill/mozmill/docs/_build/html/_static/file.png rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/_static/jquery.js => testing/mozmill/mozmill/docs/_build/html/_static/jquery.js rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/_static/minus.png => testing/mozmill/mozmill/docs/_build/html/_static/minus.png rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/_static/navigation.png => testing/mozmill/mozmill/docs/_build/html/_static/navigation.png rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/_static/plus.png => testing/mozmill/mozmill/docs/_build/html/_static/plus.png rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/_static/pygments.css => testing/mozmill/mozmill/docs/_build/html/_static/pygments.css rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/_static/rightsidebar.css => testing/mozmill/mozmill/docs/_build/html/_static/rightsidebar.css rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/_static/searchtools.js => testing/mozmill/mozmill/docs/_build/html/_static/searchtools.js rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/_static/sphinxdoc.css => testing/mozmill/mozmill/docs/_build/html/_static/sphinxdoc.css rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/_static/stickysidebar.css => testing/mozmill/mozmill/docs/_build/html/_static/stickysidebar.css rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/_static/traditional.css => testing/mozmill/mozmill/docs/_build/html/_static/traditional.css rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/genindex.html => testing/mozmill/mozmill/docs/_build/html/genindex.html rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/index.html => testing/mozmill/mozmill/docs/_build/html/index.html rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/modindex.html => testing/mozmill/mozmill/docs/_build/html/modindex.html rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/objects.inv => testing/mozmill/mozmill/docs/_build/html/objects.inv rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/search.html => testing/mozmill/mozmill/docs/_build/html/search.html rename : testing/mozmill/mozmill-1.5.0/docs/_build/html/searchindex.js => testing/mozmill/mozmill/docs/_build/html/searchindex.js rename : testing/mozmill/mozmill-1.5.0/docs/conf.py => testing/mozmill/mozmill/docs/conf.py rename : testing/mozmill/mozmill-1.5.0/docs/index.rst => testing/mozmill/mozmill/docs/index.rst rename : testing/mozmill/mozmill-1.5.0/mozmill/__init__.py => testing/mozmill/mozmill/mozmill/__init__.py rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/build.xml => testing/mozmill/mozmill/mozmill/extension/build.xml rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/chrome-jar.manifest => testing/mozmill/mozmill/mozmill/extension/chrome-jar.manifest rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/chrome.manifest => testing/mozmill/mozmill/mozmill/extension/chrome.manifest rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/chrome.js => testing/mozmill/mozmill/mozmill/extension/content/chrome.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/fg.menu.css => testing/mozmill/mozmill/mozmill/extension/content/css/fg.menu.css rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/mozmill.css => testing/mozmill/mozmill/mozmill/extension/content/css/mozmill.css rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png => testing/mozmill/mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png => testing/mozmill/mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png => testing/mozmill/mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png => testing/mozmill/mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png => testing/mozmill/mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png => testing/mozmill/mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png => testing/mozmill/mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png => testing/mozmill/mozmill/mozmill/extension/content/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/smoothness/images/ui-icons_222222_256x240.png => testing/mozmill/mozmill/mozmill/extension/content/css/smoothness/images/ui-icons_222222_256x240.png rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/smoothness/images/ui-icons_2e83ff_256x240.png => testing/mozmill/mozmill/mozmill/extension/content/css/smoothness/images/ui-icons_2e83ff_256x240.png rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/smoothness/images/ui-icons_454545_256x240.png => testing/mozmill/mozmill/mozmill/extension/content/css/smoothness/images/ui-icons_454545_256x240.png rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/smoothness/images/ui-icons_888888_256x240.png => testing/mozmill/mozmill/mozmill/extension/content/css/smoothness/images/ui-icons_888888_256x240.png rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/smoothness/images/ui-icons_cd0a0a_256x240.png => testing/mozmill/mozmill/mozmill/extension/content/css/smoothness/images/ui-icons_cd0a0a_256x240.png rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/css/smoothness/jquery-ui-1.7.1.custom.css => testing/mozmill/mozmill/mozmill/extension/content/css/smoothness/jquery-ui-1.7.1.custom.css rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/dx.js => testing/mozmill/mozmill/mozmill/extension/content/dx.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/dxwindow.xul => testing/mozmill/mozmill/mozmill/extension/content/dxwindow.xul rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/editor/bespin/BespinEmbedded.css => testing/mozmill/mozmill/mozmill/extension/content/editor/bespin/BespinEmbedded.css rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/editor/bespin/BespinEmbedded.js => testing/mozmill/mozmill/mozmill/extension/content/editor/bespin/BespinEmbedded.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/editor/bespin/BespinMain.js => testing/mozmill/mozmill/mozmill/extension/content/editor/bespin/BespinMain.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/editor/bespin/BespinWorker.js => testing/mozmill/mozmill/mozmill/extension/content/editor/bespin/BespinWorker.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/editor/bespin/resources/screen_theme/theme.less => testing/mozmill/mozmill/mozmill/extension/content/editor/bespin/resources/screen_theme/theme.less rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/editor/editor.js => testing/mozmill/mozmill/mozmill/extension/content/editor/editor.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/img/wmIcon.png => testing/mozmill/mozmill/mozmill/extension/content/img/wmIcon.png rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/inspector.js => testing/mozmill/mozmill/mozmill/extension/content/inspector.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/jquery/fg.menu.css => testing/mozmill/mozmill/mozmill/extension/content/jquery/fg.menu.css rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/jquery/fg.menu.js => testing/mozmill/mozmill/mozmill/extension/content/jquery/fg.menu.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/jquery/jquery-1.3.2.min.js => testing/mozmill/mozmill/mozmill/extension/content/jquery/jquery-1.3.2.min.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/jquery/jquery-ui-1.7.1.custom.min.js => testing/mozmill/mozmill/mozmill/extension/content/jquery/jquery-ui-1.7.1.custom.min.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/jquery/jquery.ui.core.js => testing/mozmill/mozmill/mozmill/extension/content/jquery/jquery.ui.core.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/jquery/jquery.ui.menu.js => testing/mozmill/mozmill/mozmill/extension/content/jquery/jquery.ui.menu.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/menus.js => testing/mozmill/mozmill/mozmill/extension/content/menus.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/mozmill.html => testing/mozmill/mozmill/mozmill/extension/content/mozmill.html rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/mozmill.js => testing/mozmill/mozmill/mozmill/extension/content/mozmill.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/mozmill.xul => testing/mozmill/mozmill/mozmill/extension/content/mozmill.xul rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/output.js => testing/mozmill/mozmill/mozmill/extension/content/output.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/overlay.js => testing/mozmill/mozmill/mozmill/extension/content/overlay.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/overlay.xul => testing/mozmill/mozmill/mozmill/extension/content/overlay.xul rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/overlay_tb.xul => testing/mozmill/mozmill/mozmill/extension/content/overlay_tb.xul rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/prefs.xul => testing/mozmill/mozmill/mozmill/extension/content/prefs.xul rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/rec.js => testing/mozmill/mozmill/mozmill/extension/content/rec.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/shell.js => testing/mozmill/mozmill/mozmill/extension/content/shell.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/shortcuts.js => testing/mozmill/mozmill/mozmill/extension/content/shortcuts.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/testwindow.xul => testing/mozmill/mozmill/mozmill/extension/content/testwindow.xul rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/content/ui.js => testing/mozmill/mozmill/mozmill/extension/content/ui.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/defaults/preferences/debug.js => testing/mozmill/mozmill/mozmill/extension/defaults/preferences/debug.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/install.rdf => testing/mozmill/mozmill/mozmill/extension/install.rdf rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/locale/en-US/mozmill.dtd => testing/mozmill/mozmill/mozmill/extension/locale/en-US/mozmill.dtd rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/locale/en-US/overlay.dtd => testing/mozmill/mozmill/mozmill/extension/locale/en-US/overlay.dtd rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/readme.txt => testing/mozmill/mozmill/mozmill/extension/readme.txt rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/modules/controller.js => testing/mozmill/mozmill/mozmill/extension/resource/modules/controller.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/modules/elementslib.js => testing/mozmill/mozmill/mozmill/extension/resource/modules/elementslib.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/modules/events.js => testing/mozmill/mozmill/mozmill/extension/resource/modules/events.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/modules/frame.js => testing/mozmill/mozmill/mozmill/extension/resource/modules/frame.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/modules/init.js => testing/mozmill/mozmill/mozmill/extension/resource/modules/init.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/modules/inspection.js => testing/mozmill/mozmill/mozmill/extension/resource/modules/inspection.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/modules/jum.js => testing/mozmill/mozmill/mozmill/extension/resource/modules/jum.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/modules/mozmill.js => testing/mozmill/mozmill/mozmill/extension/resource/modules/mozmill.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/modules/utils.js => testing/mozmill/mozmill/mozmill/extension/resource/modules/utils.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/stdlib/EventUtils.js => testing/mozmill/mozmill/mozmill/extension/resource/stdlib/EventUtils.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/stdlib/arrays.js => testing/mozmill/mozmill/mozmill/extension/resource/stdlib/arrays.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/stdlib/dom.js => testing/mozmill/mozmill/mozmill/extension/resource/stdlib/dom.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/stdlib/httpd.js => testing/mozmill/mozmill/mozmill/extension/resource/stdlib/httpd.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/stdlib/json2.js => testing/mozmill/mozmill/mozmill/extension/resource/stdlib/json2.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/stdlib/objects.js => testing/mozmill/mozmill/mozmill/extension/resource/stdlib/objects.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/stdlib/os.js => testing/mozmill/mozmill/mozmill/extension/resource/stdlib/os.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/stdlib/strings.js => testing/mozmill/mozmill/mozmill/extension/resource/stdlib/strings.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/resource/stdlib/withs.js => testing/mozmill/mozmill/mozmill/extension/resource/stdlib/withs.js rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/skin/chrome.css => testing/mozmill/mozmill/mozmill/extension/skin/chrome.css rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/skin/overlay.css => testing/mozmill/mozmill/mozmill/extension/skin/overlay.css rename : testing/mozmill/mozmill-1.5.0/mozmill/extension/zipexclude.lst => testing/mozmill/mozmill/mozmill/extension/zipexclude.lst rename : testing/mozmill/mozmill-1.5.0/setup.py => testing/mozmill/mozmill/setup.py rename : testing/mozmill/mozmill-1.5.0/test/test_python_callbacks_callbacks.py => testing/mozmill/mozmill/test/test_python_callbacks_callbacks.py rename : testing/mozmill/mozrunner-2.5.1/mozrunner/__init__.py => testing/mozmill/mozrunner/mozrunner/__init__.py rename : testing/mozmill/mozrunner-2.5.1/mozrunner/killableprocess.py => testing/mozmill/mozrunner/mozrunner/killableprocess.py rename : testing/mozmill/mozrunner-2.5.1/mozrunner/qijo.py => testing/mozmill/mozrunner/mozrunner/qijo.py rename : testing/mozmill/mozrunner-2.5.1/mozrunner/winprocess.py => testing/mozmill/mozrunner/mozrunner/winprocess.py rename : testing/mozmill/mozrunner-2.5.1/mozrunner/wpk.py => testing/mozmill/mozrunner/mozrunner/wpk.py rename : testing/mozmill/mozrunner-2.5.1/setup.py => testing/mozmill/mozrunner/setup.py
485 lines
14 KiB
JavaScript
485 lines
14 KiB
JavaScript
/* ***** BEGIN LICENSE BLOCK *****
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
*
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
* the License. You may obtain a copy of the License at
|
|
* http://www.mozilla.org/MPL/
|
|
*
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
* for the specific language governing rights and limitations under the
|
|
* License.
|
|
*
|
|
* The Original Code is MozMill Test code.
|
|
*
|
|
* The Initial Developer of the Original Code is Mozilla Foundation.
|
|
* Portions created by the Initial Developer are Copyright (C) 2009
|
|
* the Initial Developer. All Rights Reserved.
|
|
*
|
|
* Contributor(s):
|
|
* Henrik Skupin <hskupin@mozilla.com>
|
|
*
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
* the provisions above, a recipient may use your version of this file under
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
*
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
/**
|
|
* @fileoverview
|
|
* The ToolbarAPI adds support for accessing and interacting with toolbar elements
|
|
*
|
|
* @version 1.0.0
|
|
*/
|
|
|
|
const MODULE_NAME = 'ToolbarAPI';
|
|
|
|
const RELATIVE_ROOT = '.';
|
|
const MODULE_REQUIRES = ['UtilsAPI'];
|
|
|
|
const TIMEOUT = 5000;
|
|
|
|
const AUTOCOMPLETE_POPUP = '/id("main-window")/id("mainPopupSet")/id("PopupAutoCompleteRichResult")';
|
|
const NOTIFICATION_POPUP = '/id("main-window")/id("mainPopupSet")/id("notification-popup")';
|
|
const URLBAR_CONTAINER = '/id("main-window")/id("tab-view-deck")/{"flex":"1"}' +
|
|
'/id("navigator-toolbox")/id("nav-bar")/id("urlbar-container")';
|
|
const URLBAR_INPUTBOX = URLBAR_CONTAINER + '/id("urlbar")/anon({"anonid":"stack"})' +
|
|
'/anon({"anonid":"textbox-container"})' +
|
|
'/anon({"anonid":"textbox-input-box"})';
|
|
const CONTEXT_MENU = URLBAR_INPUTBOX + '/anon({"anonid":"input-box-contextmenu"})';
|
|
|
|
/**
|
|
* Constructor
|
|
*
|
|
* @param {MozmillController} controller
|
|
* MozMillController of the window to operate on
|
|
*/
|
|
function autoCompleteResults(controller)
|
|
{
|
|
this._controller = controller;
|
|
this.popup = this.getElement({type: "popup"});
|
|
this._results = this.getElement({type: "results"});
|
|
}
|
|
|
|
/**
|
|
* AutoComplete Result class
|
|
*/
|
|
autoCompleteResults.prototype = {
|
|
/**
|
|
* Returns all autocomplete results
|
|
*
|
|
* @returns Autocomplete results
|
|
* @type {Array of ElemBase}
|
|
*/
|
|
get allResults() {
|
|
var results = [];
|
|
for (ii = 0; ii < this.length; ii++) {
|
|
results.push(this.getResult(ii));
|
|
}
|
|
return results;
|
|
},
|
|
|
|
/**
|
|
* Returns the controller of the current window
|
|
*
|
|
* @returns Mozmill Controller
|
|
* @type MozMillController
|
|
*/
|
|
get controller() {
|
|
return this._controller;
|
|
},
|
|
|
|
/**
|
|
* Check if the autocomplete popup is open
|
|
*
|
|
* @returns True if the panel is open
|
|
* @type {boolean}
|
|
*/
|
|
get isOpened() {
|
|
return (this.popup.getNode().state == 'open');
|
|
},
|
|
|
|
/**
|
|
* Return the amount of autocomplete entries
|
|
*
|
|
* @returns Number of all entries
|
|
* @type {number}
|
|
*/
|
|
get length() {
|
|
return this._results.getNode().itemCount;
|
|
},
|
|
|
|
/**
|
|
* Returns the currently selected index
|
|
*
|
|
* @returns Selected index
|
|
* @type {number}
|
|
*/
|
|
get selectedIndex() {
|
|
return this._results.getNode().selectedIndex;
|
|
},
|
|
|
|
/**
|
|
* Returns the visible autocomplete results
|
|
*
|
|
* @returns Results
|
|
* @type {Array of ElemBase}
|
|
*/
|
|
get visibleResults() {
|
|
var results = [];
|
|
for (ii = 0; ii < this.length; ii++) {
|
|
var result = this.getResult(ii);
|
|
if (!result.getNode().hasAttribute("collapsed"))
|
|
results.push(result);
|
|
}
|
|
return results;
|
|
},
|
|
|
|
/**
|
|
* Returns the underlined text of all results from the text or URL
|
|
*
|
|
* @param {ElemBase} result
|
|
* Autocomplete result which has to be checked
|
|
* @param {string} type
|
|
* Type of element to check (text or url)
|
|
*
|
|
* @returns An array of substrings which are underlined
|
|
* @type {Array of string}
|
|
*/
|
|
getUnderlinedText : function autoCompleteResults_getUnderlinedText(result, type) {
|
|
this._controller.assertJS("subject.resultNode != null",
|
|
{resultNode: result.getNode()});
|
|
|
|
// Get the description element of the given title or url
|
|
var description = null;
|
|
switch (type) {
|
|
case "title":
|
|
description = result.getNode().boxObject.firstChild.childNodes[1].childNodes[0];
|
|
break;
|
|
case "url":
|
|
description = result.getNode().boxObject.lastChild.childNodes[2].childNodes[0];
|
|
break;
|
|
default:
|
|
throw new Error(arguments.callee.name + ": Type unknown - " + type);
|
|
}
|
|
|
|
let values = [ ];
|
|
for each (node in description.childNodes) {
|
|
if (node.nodeName == 'span') {
|
|
// Only add underlined text to the results
|
|
values.push(node.innerHTML);
|
|
}
|
|
}
|
|
|
|
return values;
|
|
},
|
|
|
|
/**
|
|
* Gets all the needed external DTD urls as an array
|
|
*
|
|
* @returns Array of external DTD urls
|
|
* @type [string]
|
|
*/
|
|
getDtds : function autoCompleteResults_getDtds() {
|
|
return null;
|
|
},
|
|
|
|
/**
|
|
* Retrieve an UI element based on the given spec
|
|
*
|
|
* @param {object} spec
|
|
* Information of the UI element which should be retrieved
|
|
* type: General type information
|
|
* subtype: Specific element or property
|
|
* value: Value of the element or property
|
|
* @returns Element which has been created
|
|
* @type {ElemBase}
|
|
*/
|
|
getElement : function autoCompleteResults_getElement(spec) {
|
|
var elem = null;
|
|
|
|
switch (spec.type) {
|
|
/**
|
|
* subtype: subtype to match
|
|
* value: value to match
|
|
*/
|
|
case "popup":
|
|
elem = new elementslib.Lookup(this._controller.window.document, AUTOCOMPLETE_POPUP);
|
|
break;
|
|
case "results":
|
|
elem = new elementslib.Lookup(this._controller.window.document,
|
|
AUTOCOMPLETE_POPUP + '/anon({"anonid":"richlistbox"})');
|
|
break;
|
|
case "result":
|
|
elem = new elementslib.Elem(this._results.getNode().getItemAtIndex(spec.value));
|
|
break;
|
|
default:
|
|
throw new Error(arguments.callee.name + ": Unknown element type - " + spec.type);
|
|
}
|
|
|
|
return elem;
|
|
},
|
|
|
|
/**
|
|
* Returns the autocomplete result element of the given index
|
|
*
|
|
* @param {number} index
|
|
* Index of the result to return
|
|
* @returns Autocomplete result element
|
|
* @type {ElemBase}
|
|
*/
|
|
getResult : function autoCompleteResults_getResult(index) {
|
|
return this.getElement({type: "result", value: index});
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Constructor
|
|
*
|
|
* @param {MozmillController} controller
|
|
* MozMillController of the window to operate on
|
|
*/
|
|
function locationBar(controller)
|
|
{
|
|
this._controller = controller;
|
|
this._autoCompleteResults = new autoCompleteResults(controller);
|
|
this._utilsApi = collector.getModule('UtilsAPI');
|
|
}
|
|
|
|
/**
|
|
* Location Bar class
|
|
*/
|
|
locationBar.prototype = {
|
|
/**
|
|
* Returns the autocomplete object
|
|
*
|
|
* @returns Autocomplete object
|
|
* @type {object}
|
|
*/
|
|
get autoCompleteResults() {
|
|
return this._autoCompleteResults;
|
|
},
|
|
|
|
/**
|
|
* Returns the controller of the current window
|
|
*
|
|
* @returns Mozmill controller
|
|
* @type {MozMillController}
|
|
*/
|
|
get controller() {
|
|
return this._controller;
|
|
},
|
|
|
|
/**
|
|
* Returns the urlbar element
|
|
*
|
|
* @returns URL bar
|
|
* @type {ElemBase}
|
|
*/
|
|
get urlbar() {
|
|
return this.getElement({type: "urlbar"});
|
|
},
|
|
|
|
/**
|
|
* Returns the currently shown URL
|
|
*
|
|
* @returns Text inside the location bar
|
|
* @type {string}
|
|
*/
|
|
get value() {
|
|
return this.urlbar.value;
|
|
},
|
|
|
|
/**
|
|
* Clear the location bar
|
|
*/
|
|
clear : function locationBar_clear() {
|
|
this.focus({type: "shortcut"});
|
|
this._controller.keypress(this.urlbar, "VK_DELETE", {});
|
|
this._controller.waitForEval("subject.value == ''",
|
|
TIMEOUT, 100, this.urlbar.getNode());
|
|
},
|
|
|
|
/**
|
|
* Close the context menu of the urlbar input field
|
|
*/
|
|
closeContextMenu : function locationBar_closeContextMenu() {
|
|
var menu = this.getElement({type: "contextMenu"});
|
|
this._controller.keypress(menu, "VK_ESCAPE", {});
|
|
},
|
|
|
|
/**
|
|
* Check if the location bar contains the given text
|
|
*
|
|
* @param {string} text
|
|
* Text which should be checked against
|
|
*/
|
|
contains : function locationBar_contains(text) {
|
|
return this.urlbar.getNode().value.indexOf(text) != -1;
|
|
},
|
|
|
|
/**
|
|
* Focus the location bar
|
|
*
|
|
* @param {object} event
|
|
* Focus the location bar with the given event (click or shortcut)
|
|
*/
|
|
focus : function locationBar_focus(event) {
|
|
switch (event.type) {
|
|
case "click":
|
|
this._controller.click(this.urlbar);
|
|
break;
|
|
case "shortcut":
|
|
var cmdKey = this._utilsApi.getEntity(this.getDtds(), "openCmd.commandkey");
|
|
this._controller.keypress(null, cmdKey, {accelKey: true});
|
|
break;
|
|
default:
|
|
throw new Error(arguments.callee.name + ": Unkown event type - " + event.type);
|
|
}
|
|
|
|
// Wait until the location bar has been focused
|
|
this._controller.waitForEval("subject.getAttribute('focused') == 'true'",
|
|
TIMEOUT, 100, this.urlbar.getNode());
|
|
},
|
|
|
|
/**
|
|
* Gets all the needed external DTD urls as an array
|
|
*
|
|
* @returns Array of external DTD urls
|
|
* @type [string]
|
|
*/
|
|
getDtds : function locationBar_getDtds() {
|
|
var dtds = ["chrome://branding/locale/brand.dtd",
|
|
"chrome://browser/locale/browser.dtd"];
|
|
return dtds;
|
|
},
|
|
|
|
/**
|
|
* Retrieve an UI element based on the given spec
|
|
*
|
|
* @param {object} spec
|
|
* Information of the UI element which should be retrieved
|
|
* type: General type information
|
|
* subtype: Specific element or property
|
|
* value: Value of the element or property
|
|
* @returns Element which has been created
|
|
* @type ElemBase
|
|
*/
|
|
getElement : function locationBar_getElement(spec) {
|
|
var elem = null;
|
|
|
|
switch(spec.type) {
|
|
/**
|
|
* subtype: subtype to match
|
|
* value: value to match
|
|
*/
|
|
case "contextMenu":
|
|
elem = new elementslib.Lookup(this._controller.window.document, CONTEXT_MENU);
|
|
break;
|
|
case "contextMenu_entry":
|
|
elem = new elementslib.Lookup(this._controller.window.document, CONTEXT_MENU +
|
|
'/{"cmd":"cmd_' + spec.subtype + '"}');
|
|
break;
|
|
case "favicon":
|
|
elem = new elementslib.ID(this._controller.window.document, "page-proxy-favicon");
|
|
break;
|
|
case "feedButton":
|
|
elem = new elementslib.ID(this._controller.window.document, "feed-button");
|
|
break;
|
|
case "goButton":
|
|
elem = new elementslib.ID(this._controller.window.document, "urlbar-go-button");
|
|
break;
|
|
case "historyDropMarker":
|
|
elem = new elementslib.Lookup(this._controller.window.document,
|
|
URLBAR_CONTAINER + '/id("urlbar")/anon({"anonid":"historydropmarker"})');
|
|
break;
|
|
case "identityBox":
|
|
elem = new elementslib.ID(this._controller.window.document, "identity-box");
|
|
break;
|
|
case "notification_element":
|
|
elem = new elementslib.Lookup(this._controller.window.document, NOTIFICATION_POPUP +
|
|
spec.subtype);
|
|
break;
|
|
case "starButton":
|
|
elem = new elementslib.ID(this._controller.window.document, "star-button");
|
|
break;
|
|
case "urlbar":
|
|
elem = new elementslib.ID(this._controller.window.document, "urlbar");
|
|
break;
|
|
case "urlbar_input":
|
|
elem = new elementslib.Lookup(this._controller.window.document, URLBAR_INPUTBOX +
|
|
'/anon({"anonid":"input"})');
|
|
break;
|
|
default:
|
|
throw new Error(arguments.callee.name + ": Unknown element type - " + spec.type);
|
|
}
|
|
|
|
return elem;
|
|
},
|
|
|
|
/**
|
|
* Retrieves the specified element of the door hanger notification bar
|
|
*
|
|
* @param {string} aType
|
|
* Type of the notification bar to look for
|
|
* @param {string} aLookupString
|
|
* Lookup string of the notification bar's child element
|
|
* [optional - default: ""]
|
|
*
|
|
* @return The created element
|
|
* @type {ElemBase}
|
|
*/
|
|
getNotificationElement : function locationBar_getNotificationElement(aType, aLookupString)
|
|
{
|
|
var lookup = '/id("' + aType + '")';
|
|
lookup = aLookupString ? lookup + aLookupString : lookup;
|
|
|
|
// Get the notification and fetch the child element if wanted
|
|
return this.getElement({type: "notification_element", subtype: lookup});
|
|
},
|
|
|
|
/**
|
|
* Load the given URL
|
|
*
|
|
* @param {string} url
|
|
* URL of web page to load
|
|
*/
|
|
loadURL : function locationBar_loadURL(url) {
|
|
this.focus({type: "shortcut"});
|
|
this.type(url);
|
|
this._controller.keypress(this.urlbar, "VK_RETURN", {});
|
|
},
|
|
|
|
/**
|
|
* Toggles between the open and closed state of the auto-complete popup
|
|
*/
|
|
toggleAutocompletePopup : function locationBar_toggleAutocompletePopup() {
|
|
var dropdown = this.getElement({type: "historyDropMarker"});
|
|
var stateOpen = this.autoCompleteResults.isOpened;
|
|
|
|
this._controller.click(dropdown);
|
|
this._controller.waitForEval("subject.isOpened == " + stateOpen,
|
|
TIMEOUT, 100, this.autoCompleteResults);
|
|
},
|
|
|
|
/**
|
|
* Type the given text into the location bar
|
|
*
|
|
* @param {string} text
|
|
* Text to enter into the location bar
|
|
*/
|
|
type : function locationBar_type(text) {
|
|
this._controller.type(this.urlbar, text);
|
|
this.contains(text);
|
|
}
|
|
}
|