Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8

MozReview-Commit-ID: Jm8BRgt6mIv
This commit is contained in:
Dan Banner 2017-10-15 19:50:30 +01:00 коммит произвёл Mark Banner
Родитель 0e715e3cda
Коммит 7caa92d5d8
1156 изменённых файлов: 3304 добавлений и 3304 удалений

Просмотреть файл

@ -888,7 +888,7 @@ var Input = {
},
setEditState: function setEditState(aEditState) {
Logger.debug(() => { return ["setEditState", JSON.stringify(aEditState)] });
Logger.debug(() => { return ["setEditState", JSON.stringify(aEditState)]; });
this.editState = aEditState;
},

Просмотреть файл

@ -480,7 +480,7 @@ this.EventManager.prototype = {
if (liveAttrs) {
return liveAttrs;
}
parent = parent.parent
parent = parent.parent;
}
return {};
};
@ -512,7 +512,7 @@ this.EventManager.prototype = {
Utils.win.clearTimeout(nextEvent.timeoutID);
queue.shift();
if (queue.length === 0) {
this._liveEventQueue.delete(domNode)
this._liveEventQueue.delete(domNode);
}
}
}

Просмотреть файл

@ -133,14 +133,14 @@ function actionInvoker(aAccOrElmOrId, aActionIndex, aActionName, aEventSeq) {
ok(false, "doAction(" + aActionIndex + ") failed with: " + e.name);
return INVOKER_ACTION_FAILED;
}
}
};
this.eventSeq = aEventSeq;
this.getID = function actionInvoker_getID() {
return "invoke an action " + aActionName + " at index " + aActionIndex +
" on " + prettyName(aAccOrElmOrId);
}
};
}
function checkerOfActionInvoker(aType, aTarget, aActionObj) {
@ -152,12 +152,12 @@ function checkerOfActionInvoker(aType, aTarget, aActionObj) {
this.getID = function getID() {
return aType + " event handling";
}
};
this.check = function check(aEvent) {
if (aActionObj && "checkOnClickEvent" in aActionObj)
aActionObj.checkOnClickEvent(aEvent);
}
};
}
var gActionDescrMap =

Просмотреть файл

@ -26,7 +26,7 @@
this.target = aAcc;
this.getID = function scrollingChecker_getID() {
return "scrolling start handling for " + prettyName(aAcc);
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -43,11 +43,11 @@
getAccessible(getAnchorTargetDocumentAcc(), [nsIAccessibleDocument]).
window;
anchorTargetWindow.close();
}
};
this.getID = function linkChecker_getID() {
return "link '" + aID + "' states check ";
}
};
}
// gA11yEventDumpToConsole = true;

Просмотреть файл

@ -31,10 +31,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=483573
this.target = aAcc;
this.getID = function focusChecker_getID() {
return "focus handling";
}
};
this.check = function focusChecker_check(aEvent) {
testStates(this.target, STATE_FOCUSED);
}
};
}
function nameChecker(aAcc, aName) {
@ -46,7 +46,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=483573
this.check = function nameChecker_check(aEvent) {
is(aEvent.accessible.name, aName,
"Wrong name of " + prettyName(aEvent.accessible) + " on focus");
}
};
}
function doTest() {

Просмотреть файл

@ -208,26 +208,26 @@ function testTextAttrsWrongOffset(aID, aOffset) {
}
const kNormalFontWeight =
function equalsToNormal(aWeight) { return aWeight <= 400 ; }
function equalsToNormal(aWeight) { return aWeight <= 400 ; };
const kBoldFontWeight =
function equalsToBold(aWeight) { return aWeight > 400; }
function equalsToBold(aWeight) { return aWeight > 400; };
// The pt font size of the input element can vary by Linux distro.
const kInputFontSize = WIN ?
"10pt" : (MAC ? "8pt" : function() { return true; });
const kAbsentFontFamily =
function(aFontFamily) { return aFontFamily != "sans-serif"; }
function(aFontFamily) { return aFontFamily != "sans-serif"; };
const kInputFontFamily =
function(aFontFamily) { return aFontFamily != "sans-serif"; }
function(aFontFamily) { return aFontFamily != "sans-serif"; };
const kMonospaceFontFamily =
function(aFontFamily) { return aFontFamily != "monospace"; }
function(aFontFamily) { return aFontFamily != "monospace"; };
const kSansSerifFontFamily =
function(aFontFamily) { return aFontFamily != "sans-serif"; }
function(aFontFamily) { return aFontFamily != "sans-serif"; };
const kSerifFontFamily =
function(aFontFamily) { return aFontFamily != "serif"; }
function(aFontFamily) { return aFontFamily != "serif"; };
const kCursiveFontFamily = LINUX ? "DejaVu Serif" : "Comic Sans MS";

Просмотреть файл

@ -137,7 +137,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=558036
getService(Components.interfaces.nsIGfxInfo);
var attrs = {
"D2D": (gfxInfo.D2DEnabled ? "true" : "false")
}
};
testAttrs(getApplicationAccessible(), attrs, false);
}

Просмотреть файл

@ -27,15 +27,15 @@
this.invoke = function removeElm_invoke() {
this.node.remove();
}
};
this.check = function removeElm_check() {
testAbsentCSSAttrs(this.accessible);
}
};
this.getID = function removeElm_getID() {
return "test CSS-based attributes on removed accessible";
}
};
}
function doTest() {

Просмотреть файл

@ -86,7 +86,7 @@ ResultsHeap.prototype =
}
return new AutoCompleteResult(values, comments);
}
}
};
/**
@ -133,7 +133,7 @@ AutoCompleteSearch.prototype =
// Results heap.
allResults: null
}
};
/**
@ -200,4 +200,4 @@ AutoCompleteResult.prototype =
// Data
values: null,
comments: null
}
};

Просмотреть файл

@ -32,15 +32,15 @@
this.invoke = function openComboboxNCheckBounds_invoke() {
getNode(aID).focus();
synthesizeKey("VK_DOWN", { altKey: true });
}
};
this.finalCheck = function openComboboxNCheckBounds_invoke() {
testBounds(this.comboboxOption);
}
};
this.getID = function openComboboxNCheckBounds_getID() {
return "open combobox and test boundaries";
}
};
}
// gA11yEventDumpToConsole = true;

Просмотреть файл

@ -603,7 +603,7 @@ function testDefunctAccessible(aAcc, aNodeOrId) {
try {
aAcc.firstChild;
} catch (e) {
success = (e.result == Components.results.NS_ERROR_FAILURE)
success = (e.result == Components.results.NS_ERROR_FAILURE);
}
ok(success, "firstChild" + msg);
@ -612,7 +612,7 @@ function testDefunctAccessible(aAcc, aNodeOrId) {
try {
aAcc.lastChild;
} catch (e) {
success = (e.result == Components.results.NS_ERROR_FAILURE)
success = (e.result == Components.results.NS_ERROR_FAILURE);
}
ok(success, "lastChild" + msg);
@ -621,7 +621,7 @@ function testDefunctAccessible(aAcc, aNodeOrId) {
try {
aAcc.childCount;
} catch (e) {
success = (e.result == Components.results.NS_ERROR_FAILURE)
success = (e.result == Components.results.NS_ERROR_FAILURE);
}
ok(success, "childCount" + msg);
@ -630,7 +630,7 @@ function testDefunctAccessible(aAcc, aNodeOrId) {
try {
aAcc.children;
} catch (e) {
success = (e.result == Components.results.NS_ERROR_FAILURE)
success = (e.result == Components.results.NS_ERROR_FAILURE);
}
ok(success, "children" + msg);
@ -680,7 +680,7 @@ function statesToString(aStates, aExtraStates) {
str += list.item(index) + ", ";
if (list.length != 0)
str += list.item(index)
str += list.item(index);
return str;
}

Просмотреть файл

@ -4,11 +4,11 @@
function editableTextTestRun() {
this.add = function add(aTest) {
this.seq.push(aTest);
}
};
this.run = function run() {
this.iterate();
}
};
this.index = 0;
this.seq = [];
@ -21,7 +21,7 @@ function editableTextTestRun() {
this.seq = null;
SimpleTest.finish();
}
};
}
/**
@ -45,7 +45,7 @@ function editableTextTest(aID) {
this.unwrapNextTest();
this.mEventQueueReady = true;
}
}
};
/**
* setTextContents test.
@ -68,7 +68,7 @@ function editableTextTest(aID) {
this.generateTest(aID, removeTripple, insertTripple, setTextContentsInvoke,
getValueChecker(aID, aValue), testID);
}
};
/**
* insertText test.
@ -86,7 +86,7 @@ function editableTextTest(aID) {
var resPos = (aResPos != undefined) ? aResPos : aPos;
this.generateTest(aID, null, [resPos, resPos + aStr.length, aStr],
insertTextInvoke, getValueChecker(aID, aResStr), testID);
}
};
/**
* copyText test.
@ -102,7 +102,7 @@ function editableTextTest(aID) {
this.generateTest(aID, null, null, copyTextInvoke,
getClipboardChecker(aID, aClipboardStr), testID);
}
};
/**
* copyText and pasteText test.
@ -120,7 +120,7 @@ function editableTextTest(aID) {
this.generateTest(aID, null, [aStartPos, aEndPos, getTextFromClipboard],
copyNPasteTextInvoke, getValueChecker(aID, aResStr), testID);
}
};
/**
* cutText test.
@ -139,7 +139,7 @@ function editableTextTest(aID) {
var resEndPos = (aResEndPos != undefined) ? aResEndPos : aEndPos;
this.generateTest(aID, [resStartPos, resEndPos, getTextFromClipboard], null,
cutTextInvoke, getValueChecker(aID, aResStr), testID);
}
};
/**
* cutText and pasteText test.
@ -159,7 +159,7 @@ function editableTextTest(aID) {
[aPos, -1, getTextFromClipboard],
cutNPasteTextInvoke, getValueChecker(aID, aResStr),
testID);
}
};
/**
* pasteText test.
@ -174,7 +174,7 @@ function editableTextTest(aID) {
this.generateTest(aID, null, [aPos, -1, getTextFromClipboard],
pasteTextInvoke, getValueChecker(aID, aResStr), testID);
}
};
/**
* deleteText test.
@ -193,7 +193,7 @@ function editableTextTest(aID) {
this.generateTest(aID, removeTripple, null, deleteTextInvoke,
getValueChecker(aID, aResStr), testID);
}
};
// ////////////////////////////////////////////////////////////////////////////
// Implementation details.
@ -237,7 +237,7 @@ function editableTextTest(aID) {
var data = this.mEventQueue.mInvokers[this.mEventQueue.mIndex + 1];
if (data)
data.func.apply(this, data.funcArgs);
}
};
/**
* Used to generate an invoker object for the sheduled test.
@ -277,7 +277,7 @@ function editableTextTest(aID) {
invoker.noEventsOnAction = true;
this.mEventQueue.mInvokers[this.mEventQueue.mIndex + 1] = invoker;
}
};
/**
* Run the tests.
@ -294,10 +294,10 @@ function editableTextTest(aID) {
thisObj.mEventQueue.onFinish = null;
return DO_NOT_FINISH_TEST;
}
};
this.mEventQueue.invoke();
}
};
this.mEventQueue = new eventQueue();
this.mEventQueueReady = false;

Просмотреть файл

@ -142,7 +142,7 @@
{ role: ROLE_TEXT_LEAF }, // plain text
{ role: ROLE_TEXT_LEAF } // HTML:b text
]
}
};
testElm("b_container", obj);
// ////////////////////////////////////////////////////////////////////////
@ -158,7 +158,7 @@
{ role: ROLE_TEXT_LEAF }, // HTML:bdi text
{ role: ROLE_TEXT_LEAF } // plain text
]
}
};
testElm("bdi_container", obj);
// ////////////////////////////////////////////////////////////////////////
@ -173,7 +173,7 @@
children: [
{ role: ROLE_TEXT_LEAF }, // plain text
]
}
};
testElm("bdo_container", obj);
// ////////////////////////////////////////////////////////////////////////
@ -651,7 +651,7 @@
{ role: ROLE_TEXT_LEAF }, // plain text
{ role: ROLE_TEXT_LEAF } // HTML:i text
]
}
};
testElm("i_container", obj);
// ////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -256,7 +256,7 @@ function eventQueue(aEventType) {
*/
this.push = function eventQueue_push(aEventInvoker) {
this.mInvokers.push(aEventInvoker);
}
};
/**
* Start the queue processing.
@ -267,14 +267,14 @@ function eventQueue(aEventType) {
// XXX: Intermittent test_events_caretmove.html fails withouth timeout,
// see bug 474952.
this.processNextInvokerInTimeout(true);
}
};
/**
* This function is called when all events in the queue were handled.
* Override it if you need to be notified of this.
*/
this.onFinish = function eventQueue_finish() {
}
};
// private
@ -427,7 +427,7 @@ function eventQueue(aEventType) {
if (this.hasUnexpectedEventsScenario())
this.processNextInvokerInTimeout(true);
}
};
this.processNextInvokerInTimeout =
function eventQueue_processNextInvokerInTimeout(aUncondProcess) {
@ -445,7 +445,7 @@ function eventQueue(aEventType) {
// Check in timeout invoker didn't fire registered events.
window.setTimeout(function(aQueue) { aQueue.processNextInvoker(); }, 300,
this);
}
};
/**
* Handle events for the current invoker.
@ -573,7 +573,7 @@ function eventQueue(aEventType) {
this.setInvokerStatus(kInvokerCanceled,
"Cancel the scheduled invoker in case of match");
}
}
};
// Helpers
this.processMatchedChecker =
@ -586,7 +586,7 @@ function eventQueue(aEventType) {
eventQueue.logEvent(aEvent, aMatchedChecker, aScenarioIdx, aEventIdx,
this.areExpectedEventsLeft(),
this.mNextInvokerStatus);
}
};
this.getNextExpectedEvent =
function eventQueue_getNextExpectedEvent(aEventSeq) {
@ -603,7 +603,7 @@ function eventQueue(aEventType) {
}
return aEventSeq.idx != aEventSeq.length ? aEventSeq[aEventSeq.idx] : null;
}
};
this.areExpectedEventsLeft =
function eventQueue_areExpectedEventsLeft(aScenario) {
@ -628,7 +628,7 @@ function eventQueue(aEventType) {
return true;
}
return false;
}
};
this.areAllEventsExpected =
function eventQueue_areAllEventsExpected() {
@ -641,7 +641,7 @@ function eventQueue(aEventType) {
}
return true;
}
};
this.isUnexpectedEventScenario =
function eventQueue_isUnexpectedEventsScenario(aScenario) {
@ -651,7 +651,7 @@ function eventQueue(aEventType) {
}
return idx == aScenario.length;
}
};
this.hasUnexpectedEventsScenario =
function eventQueue_hasUnexpectedEventsScenario() {
@ -664,7 +664,7 @@ function eventQueue(aEventType) {
}
return false;
}
};
this.hasMatchedScenario =
function eventQueue_hasMatchedScenario() {
@ -674,15 +674,15 @@ function eventQueue(aEventType) {
return true;
}
return false;
}
};
this.getInvoker = function eventQueue_getInvoker() {
return this.mInvokers[this.mIndex];
}
};
this.getNextInvoker = function eventQueue_getNextInvoker() {
return this.mInvokers[++this.mIndex];
}
};
this.setEventHandler = function eventQueue_setEventHandler(aInvoker) {
if (!("scenarios" in aInvoker) || aInvoker.scenarios.length == 0) {
@ -762,7 +762,7 @@ function eventQueue(aEventType) {
}
return true;
}
};
this.clearEventHandler = function eventQueue_clearEventHandler() {
if (!this.mScenarios)
@ -785,7 +785,7 @@ function eventQueue(aEventType) {
}
}
this.mScenarios = null;
}
};
this.getEventID = function eventQueue_getEventID(aChecker) {
if ("getID" in aChecker)
@ -793,14 +793,14 @@ function eventQueue(aEventType) {
var invoker = this.getInvoker();
return invoker.getID();
}
};
this.setInvokerStatus = function eventQueue_setInvokerStatus(aStatus, aLogMsg) {
this.mNextInvokerStatus = aStatus;
// Uncomment it to debug invoker processing logic.
// gLogger.log(eventQueue.invokerStatusToMsg(aStatus, aLogMsg));
}
};
this.mDefEventType = aEventType;
@ -828,7 +828,7 @@ eventQueue.getEventTypeAsString =
return (typeof aEventOrChecker.type == "string") ?
aEventOrChecker.type : eventTypeToString(aEventOrChecker.type);
}
};
eventQueue.getEventTargetDescr =
function eventQueue_getEventTargetDescr(aEventOrChecker, aDontForceTarget) {
@ -847,18 +847,18 @@ eventQueue.getEventTargetDescr =
var target = ("target" in aEventOrChecker) ? aEventOrChecker.target : null;
return prettyName(target);
}
};
eventQueue.getEventPhase = function eventQueue_getEventPhase(aChecker) {
return ("phase" in aChecker) ? aChecker.phase : true;
}
};
eventQueue.compareEventTypes =
function eventQueue_compareEventTypes(aChecker, aEvent) {
var eventType = (aEvent instanceof nsIDOMEvent) ?
aEvent.type : aEvent.eventType;
return aChecker.type == eventType;
}
};
eventQueue.compareEvents = function eventQueue_compareEvents(aChecker, aEvent) {
if (!eventQueue.compareEventTypes(aChecker, aEvent))
@ -882,7 +882,7 @@ eventQueue.compareEvents = function eventQueue_compareEvents(aChecker, aEvent) {
var target2 = (aEvent instanceof nsIDOMEvent) ?
aEvent.originalTarget : aEvent.DOMNode;
return target1 == target2;
}
};
eventQueue.isSameEvent = function eventQueue_isSameEvent(aChecker, aEvent) {
// We don't have stored info about handled event other than its type and
@ -891,7 +891,7 @@ eventQueue.isSameEvent = function eventQueue_isSameEvent(aChecker, aEvent) {
return this.compareEvents(aChecker, aEvent) &&
!(aEvent instanceof nsIAccessibleTextChangeEvent) &&
!(aEvent instanceof nsIAccessibleStateChangeEvent);
}
};
eventQueue.invokerStatusToMsg =
function eventQueue_invokerStatusToMsg(aInvokerStatus, aMsg) {
@ -912,7 +912,7 @@ eventQueue.invokerStatusToMsg =
msg += " (" + aMsg + ")";
return msg;
}
};
eventQueue.logEvent = function eventQueue_logEvent(aOrigEvent, aMatchedChecker,
aScenarioIdx, aEventIdx,
@ -939,7 +939,7 @@ eventQueue.logEvent = function eventQueue_logEvent(aOrigEvent, aMatchedChecker,
var msg = "EQ event, type: " + currType + ", target: " + currTargetDescr +
", " + infoMsg;
gLogger.logToDOM(msg, true, emphText);
}
};
// //////////////////////////////////////////////////////////////////////////////
@ -968,7 +968,7 @@ function sequence() {
aItemID) {
var item = new sequenceItem(aProcessor, aEventType, aTarget, aItemID);
this.items.push(item);
}
};
/**
* Process next sequence item.
@ -982,7 +982,7 @@ function sequence() {
}
this.items[this.idx].startProcess();
}
};
this.items = [];
this.idx = -1;
@ -1060,16 +1060,16 @@ function synthClick(aNodeOrID, aCheckerOrEventSeq, aArgs) {
x = targetNode.boxObject.width - 1;
}
synthesizeMouse(targetNode, x, y, aArgs ? aArgs : {});
}
};
this.finalCheck = function synthClick_finalCheck() {
// Scroll top window back.
window.top.scrollTo(0, 0);
}
};
this.getID = function synthClick_getID() {
return prettyName(aNodeOrID) + " click";
}
};
}
/**
@ -1081,11 +1081,11 @@ function synthMouseMove(aID, aCheckerOrEventSeq) {
this.invoke = function synthMouseMove_invoke() {
synthesizeMouse(this.DOMNode, 1, 1, { type: "mousemove" });
synthesizeMouse(this.DOMNode, 2, 2, { type: "mousemove" });
}
};
this.getID = function synthMouseMove_getID() {
return prettyName(aID) + " mouse move";
}
};
}
/**
@ -1096,7 +1096,7 @@ function synthKey(aNodeOrID, aKey, aArgs, aCheckerOrEventSeq) {
this.invoke = function synthKey_invoke() {
synthesizeKey(this.mKey, this.mArgs, this.mWindow);
}
};
this.getID = function synthKey_getID() {
var key = this.mKey;
@ -1138,7 +1138,7 @@ function synthKey(aNodeOrID, aKey, aArgs, aCheckerOrEventSeq) {
key += " alt";
}
return prettyName(aNodeOrID) + " '" + key + " ' key";
}
};
this.mKey = aKey;
this.mArgs = aArgs ? aArgs : {};
@ -1229,7 +1229,7 @@ function synthOpenComboboxKey(aID, aCheckerOrEventSeq) {
this.getID = function synthOpenComboboxKey_getID() {
return "open combobox (atl + down arrow) " + prettyName(aID);
}
};
}
/**
@ -1247,11 +1247,11 @@ function synthFocus(aNodeOrID, aCheckerOrEventSeq) {
this.DOMNode.selectionStart = this.DOMNode.selectionEnd = this.DOMNode.value.length;
}
this.DOMNode.focus();
}
};
this.getID = function synthFocus_getID() {
return prettyName(aNodeOrID) + " focus";
}
};
}
/**
@ -1265,11 +1265,11 @@ function synthFocusOnFrame(aNodeOrID, aCheckerOrEventSeq) {
this.invoke = function synthFocus_invoke() {
this.DOMNode.body.focus();
}
};
this.getID = function synthFocus_getID() {
return prettyName(aNodeOrID) + " frame document focus";
}
};
}
/**
@ -1320,16 +1320,16 @@ function changeCurrentItem(aID, aItemID) {
ok(false, "Error in test: proposed current item is already current" + prettyName(aID));
controlNode.currentItem = itemNode;
}
};
this.getID = function changeCurrentItem_getID() {
return "current item change for " + prettyName(aID);
}
};
this.reportError = function changeCurrentItem_reportError() {
ok(false,
"Error in test: proposed current item '" + aItemID + "' is already current");
}
};
}
/**
@ -1341,7 +1341,7 @@ function toggleTopMenu(aID, aCheckerOrEventSeq) {
this.getID = function toggleTopMenu_getID() {
return "toggle top menu on " + prettyName(aID);
}
};
}
/**
@ -1353,7 +1353,7 @@ function synthContextMenu(aID, aCheckerOrEventSeq) {
this.getID = function synthContextMenu_getID() {
return "context menu on " + prettyName(aID);
}
};
}
/**
@ -1367,11 +1367,11 @@ function openCombobox(aComboboxID) {
this.invoke = function openCombobox_invoke() {
getNode(aComboboxID).focus();
synthesizeKey("VK_DOWN", { altKey: true });
}
};
this.getID = function openCombobox_getID() {
return "open combobox " + prettyName(aComboboxID);
}
};
}
/**
@ -1384,11 +1384,11 @@ function closeCombobox(aComboboxID) {
this.invoke = function closeCombobox_invoke() {
synthesizeKey("VK_ESCAPE", { });
}
};
this.getID = function closeCombobox_getID() {
return "close combobox " + prettyName(aComboboxID);
}
};
}
@ -1406,11 +1406,11 @@ function synthSelectAll(aNodeOrID, aCheckerOrEventSeq) {
} else {
window.getSelection().selectAllChildren(this.DOMNode);
}
}
};
this.getID = function synthSelectAll_getID() {
return aNodeOrID + " selectall";
}
};
}
/**
@ -1427,7 +1427,7 @@ function moveToLineEnd(aID, aCaretOffset) {
this.getID = function moveToLineEnd_getID() {
return "move to line end in " + prettyName(aID);
}
};
}
/**
@ -1443,11 +1443,11 @@ function moveToPrevLineEnd(aID, aCaretOffset) {
synthesizeKey("VK_RIGHT", { metaKey: true });
else
synthesizeKey("VK_END", { });
}
};
this.getID = function moveToPrevLineEnd_getID() {
return "move to previous line end in " + prettyName(aID);
}
};
}
/**
@ -1464,7 +1464,7 @@ function moveToLineStart(aID, aCaretOffset) {
this.getID = function moveToLineEnd_getID() {
return "move to line start in " + prettyName(aID);
}
};
}
/**
@ -1481,7 +1481,7 @@ function moveToTextStart(aID) {
this.getID = function moveToTextStart_getID() {
return "move to text start in " + prettyName(aID);
}
};
}
/**
@ -1506,17 +1506,17 @@ function moveCaretToDOMPoint(aID, aDOMPointNodeID, aDOMPointOffset,
selection.removeRange(selRange);
selection.addRange(selRange);
}
};
this.getID = function moveCaretToDOMPoint_getID() {
return "Set caret on " + prettyName(aID) + " at point: " +
prettyName(aDOMPointNodeID) + " node with offset " + aDOMPointOffset;
}
};
this.finalCheck = function moveCaretToDOMPoint_finalCheck() {
if (aCheckFunc)
aCheckFunc.call();
}
};
this.eventSeq = [
new caretMoveChecker(aExpectedOffset, this.target)
@ -1536,11 +1536,11 @@ function setCaretOffset(aID, aOffset, aFocusTargetID) {
this.invoke = function setCaretOffset_invoke() {
this.target.caretOffset = this.offset;
}
};
this.getID = function setCaretOffset_getID() {
return "Set caretOffset on " + prettyName(aID) + " at " + this.offset;
}
};
this.eventSeq = [
new caretMoveChecker(this.offset, this.target)
@ -1637,7 +1637,7 @@ function focusChecker(aTargetOrFunc, aTargetFuncArg) {
this.check = function focusChecker_check(aEvent) {
testStates(aEvent.accessible, STATE_FOCUSED);
}
};
}
function nofocusChecker(aID) {
@ -1688,7 +1688,7 @@ function textChangeChecker(aID, aStart, aEnd, aTextOrFunc, aIsInserted, aFromUse
if (typeof aFromUser != "undefined")
is(aEvent.isFromUserInput, aFromUser,
"wrong value of isFromUserInput() for " + prettyName(aID));
}
};
}
/**
@ -1703,7 +1703,7 @@ function caretMoveChecker(aCaretOffset, aTargetOrFunc, aTargetFuncArg,
is(aEvent.QueryInterface(nsIAccessibleCaretMoveEvent).caretOffset,
aCaretOffset,
"Wrong caret offset for " + prettyName(aEvent.accessible));
}
};
}
function asyncCaretMoveChecker(aCaretOffset, aTargetOrFunc, aTargetFuncArg) {
@ -1723,7 +1723,7 @@ function textSelectionChecker(aID, aStartOffset, aEndOffset) {
} else {
testTextGetSelection(aID, aStartOffset, aEndOffset, 0);
}
}
};
}
/**
@ -1797,7 +1797,7 @@ function stateChangeChecker(aState, aIsExtraState, aIsEnabled,
var unxpdState = aIsEnabled ? 0 : (aIsExtraState ? 0 : aState);
var unxpdExtraState = aIsEnabled ? 0 : (aIsExtraState ? aState : 0);
testStates(event.accessible, state, extraState, unxpdState, unxpdExtraState);
}
};
this.match = function stateChangeChecker_match(aEvent) {
if (aEvent instanceof nsIAccessibleStateChangeEvent) {
@ -1806,7 +1806,7 @@ function stateChangeChecker(aState, aIsExtraState, aIsEnabled,
(scEvent.state == aState);
}
return false;
}
};
}
function asyncStateChangeChecker(aState, aIsExtraState, aIsEnabled,
@ -1841,7 +1841,7 @@ function expandedStateChecker(aIsEnabled, aTargetOrFunc, aTargetFuncArg) {
testStates(event.accessible,
(aIsEnabled ? STATE_EXPANDED : STATE_COLLAPSED));
}
};
}
// //////////////////////////////////////////////////////////////////////////////
@ -2128,13 +2128,13 @@ function sequenceItem(aProcessor, aEventType, aTarget, aItemID) {
this.startProcess = function sequenceItem_startProcess() {
this.queue.invoke();
}
};
this.queue = new eventQueue();
this.queue.onFinish = function() {
aProcessor.onProcessed();
return DO_NOT_FINISH_TEST;
}
};
var invoker = {
invoke: function invoker_invoke() {
@ -2173,5 +2173,5 @@ function synthAction(aNodeOrID, aEventsObj) {
defineScenario(this, scenarios[i]);
}
this.getID = function synthAction_getID() { return prettyName(aNodeOrID) + " action"; }
this.getID = function synthAction_getID() { return prettyName(aNodeOrID) + " action"; };
}

Просмотреть файл

@ -36,15 +36,15 @@
}
function changeAlert(aID) {
this.__defineGetter__("DOMNode", function() { return getNode(aID) });
this.__defineGetter__("DOMNode", function() { return getNode(aID); });
this.invoke = function changeAlert_invoke() {
this.DOMNode.textContent = "new alert";
}
};
this.getID = function showAlert_getID() {
return "Change ARIA alert " + aID;
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -37,11 +37,11 @@
this.invoke = function focusMenu_invoke() {
getNode(aMenuID).focus();
}
};
this.getID = function focusMenu_getID() {
return "focus menu '" + aMenuID + "'";
}
};
}
function showMenu(aMenuID, aParentMenuID, aHow) {
@ -88,13 +88,13 @@
this.menuNode.style.display = "none";
else
this.menuNode.style.visibility = "hidden";
}
};
this.getID = function closeMenu_getID() {
return "Close ARIA menu " + aMenuID + " by " +
(aHow == kViaDisplayStyle ? "display" : "visibility") +
" style tricks";
}
};
function getMenu(aThisObj) {
return aThisObj.menu;
@ -112,11 +112,11 @@
this.invoke = function focusInsideMenu_invoke() {
getNode(aMenuID).focus();
}
};
this.getID = function focusInsideMenu_getID() {
return "focus menu '" + aMenuID + "'";
}
};
}
function blurMenu(aMenuBarID) {
@ -129,7 +129,7 @@
this.getID = function blurMenu_getID() {
return "blur menu";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -51,7 +51,7 @@
testAbsentAttrs(aID, { "hidden": "true"});
testAbsentAttrs(aChildId, { "hidden": "true"});
}
}
};
}
// Debug stuff.

Просмотреть файл

@ -34,7 +34,7 @@
var accessible = getAccessible(this.noTarget);
testAbsentAttrs(accessible, { "event-from-input": "" });
}
};
}
/**

Просмотреть файл

@ -32,11 +32,11 @@
this.invoke = function changeMultipleElements_invoke() {
this.node1.textContent = "a";
this.node2.textContent = "b";
}
};
this.getID = function changeMultipleElements_invoke_getID() {
return "Change the text content of multiple sibling divs";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -32,11 +32,11 @@
this.invoke = function changeMultipleElements_invoke() {
this.node1.textContent = "a";
this.node2.textContent = "b";
}
};
this.getID = function changeMultipleElements_invoke_getID() {
return "Change the text content of multiple sibling divs";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -33,7 +33,7 @@
is(acc.caretOffset, aExtraCaretOffset,
"Wrong caret offset for " + aExtraNodeOrID);
}
}
};
}
/**

Просмотреть файл

@ -43,7 +43,7 @@
this.invokeAction(this.parentNode, aParentAction);
this.invokeAction(this.childNode, aChildAction);
}
}
};
this.getID = function coalescenceBase_getID() {
var childAction = this.getActionName(aChildAction) + " child";
@ -53,7 +53,7 @@
return childAction + " and then " + parentAction;
return parentAction + " and then " + childAction;
}
};
this.finalCheck = function coalescenceBase_check() {
if (this.getEventType(aChildAction) == EVENT_HIDE) {
@ -62,7 +62,7 @@
if (this.getEventType(aParentAction) == EVENT_HIDE) {
testIsDefunct(this.parent);
}
}
};
// Implementation details
@ -90,7 +90,7 @@
default:
return INVOKER_ACTION_FAILED;
}
}
};
this.getEventType = function coalescenceBase_getEventType(aAction) {
switch (aAction) {
@ -99,7 +99,7 @@
case kAddElm: case kShowElm:
return EVENT_SHOW;
}
}
};
this.getActionName = function coalescenceBase_getActionName(aAction) {
switch (aAction) {
@ -114,7 +114,7 @@
default:
return "??";
}
}
};
this.initSequence = function coalescenceBase_initSequence() {
// expected events
@ -129,7 +129,7 @@
new invokerChecker(this.getEventType(aChildAction), this.childNode),
new invokerChecker(EVENT_REORDER, this.parentNode)
];
}
};
}
/**
@ -147,7 +147,7 @@
this.child = getAccessible(this.childNode);
this.parent = getAccessible(this.parentNode);
this.hostNode = this.parentNode.parentNode;
}
};
// Initalization
@ -239,7 +239,7 @@
this.parentNode = document.createElement("select");
this.childNode = document.createElement("option");
this.childNode.textContent = "testing";
}
};
this.__proto__ = new coalescenceBase(kAddElm, kAddElm,
aPerformActionOnChildInTheFirstPlace);
@ -257,7 +257,7 @@
this.parentNode = getNode(aParentID);
this.hostNode = this.parentNode.parentNode;
this.childNode = getNode(aChildID);
}
};
this.__proto__ = new coalescenceBase(kShowElm, kShowElm,
aPerformActionOnChildInTheFirstPlace);
@ -276,7 +276,7 @@
this.hostNode = this.parentNode.parentNode;
this.childNode = document.createElement("option");
this.childNode.textContent = "testing";
}
};
this.__proto__ = new coalescenceBase(kAddElm, kShowElm,
aPerformActionOnChildInTheFirstPlace);
@ -305,11 +305,11 @@
this.child1.remove();
this.child2.remove();
this.parent.hidden = true;
}
};
this.getID = function removeGrandChildrenNHideParent_getID() {
return "remove grand children of different parents and then hide their grand parent";
}
};
}
/**
@ -329,16 +329,16 @@
this.invoke = function test3_invoke() {
getNode("t3_o").textContent = "";
getNode("t3_lb").removeChild(getNode("t3_o"));
}
};
this.finalCheck = function test3_finalCheck() {
testIsDefunct(this.o);
testIsDefunct(this.ofc);
}
};
this.getID = function test3_getID() {
return "remove a child, and then its parent";
}
};
}
/**
@ -363,17 +363,17 @@
getNode("t4_o1").textContent = "";
getNode("t4_o2").textContent = "";
getNode("t4_lb").removeChild(getNode("t4_o2"));
}
};
this.finalCheck = function test4_finalCheck() {
testIsDefunct(this.o1fc);
testIsDefunct(this.o2);
testIsDefunct(this.o2fc);
}
};
this.getID = function test4_getID() {
return "remove children, and then a parent of 2nd child";
}
};
}
/**
@ -398,17 +398,17 @@
getNode("t5_o").textContent = "";
getNode("t5").removeChild(getNode("t5_b"));
getNode("t5_lb").removeChild(getNode("t5_o"));
}
};
this.finalCheck = function test5_finalCheck() {
testIsDefunct(this.ofc);
testIsDefunct(this.o);
testIsDefunct(this.b);
}
};
this.getID = function test5_getID() {
return "remove a child, remove a parent sibling, remove the parent";
}
};
}
/**

Просмотреть файл

@ -33,11 +33,11 @@
this.invoke = function showContextMenu_invoke() {
synthesizeMouse(this.DOMNode, 4, 4, { type: "contextmenu", button: 2 });
}
};
this.getID = function showContextMenu_getID() {
return "show context menu";
}
};
}
function selectMenuItem() {
@ -47,11 +47,11 @@
this.invoke = function selectMenuItem_invoke() {
synthesizeKey("VK_DOWN", { });
}
};
this.getID = function selectMenuItem_getID() {
return "select first menuitem";
}
};
}
function closeContextMenu(aID) {
@ -62,11 +62,11 @@
this.invoke = function closeContextMenu_invoke() {
synthesizeKey("VK_ESCAPE", { });
}
};
this.getID = function closeContextMenu_getID() {
return "close context menu";
}
};
}
function getContextMenuNode() {

Просмотреть файл

@ -28,11 +28,11 @@
this.eventSeq = [ aChecker ];
this.invoke = function setAttr_invoke() {
getNode(aID).setAttribute(aAttr, aValue);
}
};
this.getID = function setAttr_getID() {
return "set attr '" + aAttr + "', value '" + aValue + "'";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -51,7 +51,7 @@
this.invoke = function changeIframeSrc_invoke() {
this.DOMNode.src = aURL;
}
};
this.finalCheck = function changeIframeSrc_finalCheck() {
var accTree = {
@ -65,11 +65,11 @@
};
testAccessibleTree(this.DOMNode, accTree);
}
};
this.getID = function changeIframeSrc_getID() {
return "change iframe src on " + aURL;
}
};
function getIframeDoc() {
return getAccessible(getNode(aIdentifier).contentDocument);
@ -104,7 +104,7 @@
} else {
this.IFrameContainerDOMNode.removeChild(this.DOMNode);
}
}
};
this.finalCheck = function morphIFrame_finalCheck() {
var accTree = {
@ -121,7 +121,7 @@
};
testAccessibleTree(this.IFrameContainerDOMNode, accTree);
}
};
this.getID = function morphIFrame_getID() {
if (aAction == kRemove)
@ -129,7 +129,7 @@
return "change display style of iframe to " +
((aAction == kHide) ? "none" : "block");
}
};
}
function makeIFrameVisible(aID) {
@ -141,11 +141,11 @@
this.invoke = function makeIFrameVisible_invoke() {
this.DOMNode.style.visibility = "visible";
}
};
this.getID = function makeIFrameVisible_getID() {
return "The accessible for DOM document loaded before it's shown shouldn't have busy state.";
}
};
}
function openDialogWnd(aURL) {
@ -167,11 +167,11 @@
this.invoke = function openDialogWnd_invoke() {
this.mDialog = window.openDialog(aURL);
}
};
this.finalCheck = function openDialogWnd_finalCheck() {
this.finalCheckImpl();
}
};
this.finalCheckImpl = function openDialogWnd_finalCheckImpl() {
var accTree = {
@ -205,11 +205,11 @@
ok(!isAccessibleInCache(dlgDoc),
"The document accessible for '" + aURL + "' is in cache still!");
});
}
};
this.getID = function openDialogWnd_getID() {
return "open dialog '" + aURL + "'";
}
};
}
function openWndShutdownDoc() {
@ -244,7 +244,7 @@
// be shut down.
ok(!isAccessibleInCache(this.iframeDoc),
"The document accessible for iframe is in cache still!");
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -31,11 +31,11 @@
this.invoke = function showARIADialog_invoke() {
this.dialogNode.style.display = "block";
}
};
this.getID = function showARIADialog_getID() {
return "show ARIA dialog";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -32,15 +32,15 @@
if (aGrabValue != undefined) {
this.DOMNode.setAttribute("aria-grabbed", aGrabValue);
}
}
};
this.check = function changeGrabbed_check() {
testAttrs(aNodeOrID, {"grabbed": aGrabValue}, true);
}
};
this.getID = function changeGrabbed_getID() {
return prettyName(aNodeOrID) + " aria-grabbed changed";
}
};
}
// aria dropeffect invoker
@ -51,15 +51,15 @@
if (aDropeffectValue != undefined) {
this.DOMNode.setAttribute("aria-dropeffect", aDropeffectValue);
}
}
};
this.check = function changeDropeffect_check() {
testAttrs(aNodeOrID, {"dropeffect": aDropeffectValue}, true);
}
};
this.getID = function changeDropeffect_getID() {
return prettyName(aNodeOrID) + " aria-dropeffect changed";
}
};
}
function doTests() {

Просмотреть файл

@ -29,11 +29,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=429547
this.invoke = function changeARIAActiveDescendant_invoke() {
getNode(aID).setAttribute("aria-activedescendant", aItemID);
}
};
this.getID = function changeARIAActiveDescendant_getID() {
return "change aria-activedescendant on " + aItemID;
}
};
}
function insertItemNFocus(aID, aNewItemID) {
@ -50,11 +50,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=429547
container.appendChild(itemNode);
container.setAttribute("aria-activedescendant", aNewItemID);
}
};
this.getID = function insertItemNFocus_getID() {
return "insert new node and focus it with ID: " + aNewItemID;
}
};
}
var gQueue = null;

Просмотреть файл

@ -26,7 +26,7 @@
this.invoke = function focusElmWhileSubdocIsFocused_invoke() {
this.DOMNode.focus();
}
};
this.eventSeq = [
new focusChecker(this.DOMNode)
@ -38,7 +38,7 @@
this.getID = function focusElmWhileSubdocIsFocused_getID() {
return "Focus element while subdocument is focused " + prettyName(aID);
}
};
}
function imageMapChecker(aID) {
@ -46,21 +46,21 @@
this.type = EVENT_FOCUS;
this.match = function imageMapChecker_match(aEvent) {
return aEvent.DOMNode == node;
}
};
}
function topMenuChecker() {
this.type = EVENT_FOCUS;
this.match = function topMenuChecker_match(aEvent) {
return aEvent.accessible.role == ROLE_PARENT_MENUITEM;
}
};
}
function contextMenuChecker() {
this.type = EVENT_MENUPOPUP_START;
this.match = function contextMenuChecker_match(aEvent) {
return aEvent.accessible.role == ROLE_MENUPOPUP;
}
};
}
function focusContextMenuItemChecker() {
@ -68,7 +68,7 @@
this.match = function focusContextMenuItemChecker_match(aEvent) {
return aEvent.accessible.role == ROLE_MENUITEM;
}
};
}
/**

Просмотреть файл

@ -27,7 +27,7 @@
var target = aEvent.accessible;
is(target.description, aDescription,
"Wrong description for " + prettyName(target));
}
};
}
var gFocusHandler = {
@ -83,7 +83,7 @@
gButtonElm.removeEventListener("blur", gBlurHandler);
gTextboxElm.removeEventListener("focus", gFocusHandler);
gTextboxElm.removeEventListener("blur", gBlurHandler);
}
};
var descr = "It's a tooltip";
gQueue.push(new synthFocus("button", new actionChecker("button", descr)));

Просмотреть файл

@ -33,12 +33,12 @@
this.DOMNode.setSelectionRange(aStart, aEnd);
synthesizeKey("VK_DELETE", {});
}
};
this.getID = function removeTextFromInput_getID() {
return "Remove text from " + aStart + " to " + aEnd + " for " +
prettyName(aID);
}
};
}
/**
@ -61,12 +61,12 @@
selection.addRange(range);
synthesizeKey("VK_DELETE", {});
}
};
this.getID = function removeTextFromContentEditable_getID() {
return "Remove text from " + aStart + " to " + aEnd + " for " +
prettyName(aID);
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -60,7 +60,7 @@
}
}
return -1;
}
};
/**
* Replace the default target currently registered for a given event type
@ -74,7 +74,7 @@
var checker = new invokerChecker(type, aTargets[i]);
this.getEventSeq().splice(++targetIdx, 0, checker);
}
}
};
// Implementation
this.getA11yEventType = function mutateA11yTree_getA11yEventType(aEventType) {
@ -86,11 +86,11 @@
if (aEventType == kShowEvent)
return nsIAccessibleEvent.EVENT_SHOW;
}
};
this.getEventSeq = function mutateA11yTree_getEventSeq() {
return this.doNotExpectEvents ? this.unexpectedEventSeq : this.eventSeq;
}
};
if (aEventTypes & kHideEvent) {
var checker = new invokerChecker(this.getA11yEventType(kHideEvent),
@ -119,11 +119,11 @@
this.invoke = function changeStyle_invoke() {
this.DOMNode.style[aProp] = aValue;
}
};
this.getID = function changeStyle_getID() {
return aNodeOrID + " change style " + aProp + " on value " + aValue;
}
};
}
/**
@ -134,11 +134,11 @@
this.invoke = function changeClass_invoke() {
this.parentDOMNode.className = aClassName;
}
};
this.getID = function changeClass_getID() {
return aNodeOrID + " change class " + aClassName;
}
};
this.parentDOMNode = getNode(aParentNodeOrID);
}
@ -168,11 +168,11 @@
}
this.DOMNode.parentNode.appendChild(newElm);
}
};
this.getID = function cloneAndAppendToDOM_getID() {
return aNodeOrID + " clone and append to DOM.";
}
};
}
/**
@ -188,11 +188,11 @@
this.invoke = function removeFromDOM_invoke() {
this.DOMNode.remove();
}
};
this.getID = function removeFromDOM_getID() {
return prettyName(aNodeOrID) + " remove from DOM.";
}
};
if (aTargetsFunc && (eventTypes & kHideEvent))
this.setTargets(kHideEvent, aTargetsFunc.call(null, this.DOMNode));
@ -211,11 +211,11 @@
this.invoke = function cloneAndReplaceInDOM_invoke() {
this.DOMNode.parentNode.replaceChild(this.newElm, this.DOMNode);
}
};
this.getID = function cloneAndReplaceInDOM_getID() {
return aNodeOrID + " clone and replace in DOM.";
}
};
this.newElm = this.DOMNode.cloneNode(true);
this.newElm.removeAttribute("id");
@ -241,12 +241,12 @@
getComputedStyle(this.divNode, "").color;
this.containerNode.removeChild(this.divNode);
this.containerNode.appendChild(this.divNode);
}
};
this.getID = function test1_getID() {
return "fuzzy test #1: content insertion (flush layout), removal and" +
"reinsertion";
}
};
}
/**
@ -275,12 +275,12 @@
getComputedStyle(this.divNode, "").color;
this.tmpContainerNode.removeChild(this.divNode);
this.containerNode.appendChild(this.divNode);
}
};
this.getID = function test2_getID() {
return "fuzzy test #2: content insertion (flush layout), removal and" +
"reinsertion under another container";
}
};
}
/**
@ -301,11 +301,11 @@
this.containerNode.appendChild(this.divNode);
getComputedStyle(this.divNode, "").color;
this.containerNode.removeChild(this.divNode);
}
};
this.getID = function test3_getID() {
return "fuzzy test #3: content insertion (flush layout) and removal";
}
};
}
function insertReferredElm(aContainerID) {
@ -320,11 +320,11 @@
this.invoke = function insertReferredElm_invoke() {
this.containerNode.innerHTML =
"<span id='insertReferredElms_span'></span><input aria-labelledby='insertReferredElms_span'>";
}
};
this.getID = function insertReferredElm_getID() {
return "insert inaccessible element and then insert referring element to make it accessible";
}
};
}
function showHiddenParentOfVisibleChild() {
@ -336,11 +336,11 @@
this.invoke = function showHiddenParentOfVisibleChild_invoke() {
getNode("c4_middle").style.visibility = "visible";
}
};
this.getID = function showHiddenParentOfVisibleChild_getID() {
return "show hidden parent of visible child";
}
};
}
function hideNDestroyDoc() {
@ -352,15 +352,15 @@
this.invoke = function hideNDestroyDoc_invoke() {
this.txt = getAccessible("c5").firstChild.firstChild;
this.txt.DOMNode.remove();
}
};
this.check = function hideNDestroyDoc_check() {
getNode("c5").remove();
}
};
this.getID = function hideNDestroyDoc_getID() {
return "remove text node and destroy a document on hide event";
}
};
}
function hideHideNDestroyDoc() {
@ -376,15 +376,15 @@
var l2 = doc.lastChild;
l1.DOMNode.firstChild.remove();
l2.DOMNode.firstChild.remove();
}
};
this.check = function hideHideNDestroyDoc_check() {
getNode("c6").remove();
}
};
this.getID = function hideHideNDestroyDoc_getID() {
return "remove text nodes (2 events in the queue) and destroy a document on first hide event";
}
};
}
/**

Просмотреть файл

@ -46,11 +46,11 @@
var span = document.createElement("span");
span.setAttribute("style", "-moz-binding:url(#button)");
this.containerNode.appendChild(span);
}
};
this.getID = function insertBinding_getID() {
return "insert button binding";
}
};
}
/**

Просмотреть файл

@ -28,11 +28,11 @@
this.eventSeq = [ aChecker ];
this.invoke = function setAttr_invoke() {
getNode(aID).setAttribute(aAttr, aValue);
}
};
this.getID = function setAttr_getID() {
return "set attr '" + aAttr + "', value '" + aValue + "'";
}
};
}
/**
@ -46,11 +46,11 @@
this.invoke = function setAttr_recreate_invoke() {
todo(false, "No accessible recreation should happen, just name change event");
getNode(aID).setAttribute(aAttr, aValue);
}
};
this.getID = function setAttr_recreate_getID() {
return "set attr '" + aAttr + "', value '" + aValue + "'";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -38,11 +38,11 @@
itemNode.removeAttribute("aria-selected");
this.itemNode.setAttribute("aria-selected", "true");
}
};
this.getID = function selectItem_getID() {
return "select item " + prettyName(aItemID);
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -46,7 +46,7 @@
ok(event.isExtraState, "Extra state change was expected");
is(event.state, EXT_STATE_EDITABLE, "Wrong state of statechange event");
ok(event.isEnabled, "Expected editable state to be enabled");
}
};
this.getID = function editabledoc_getID() {
return prettyName(aDocNode) + " editable state changed";
@ -79,12 +79,12 @@
this.invoke = function changeCheckInput_invoke() {
this.DOMNode.checked = aIsChecked;
}
};
this.getID = function changeCheckInput_getID() {
return "change checked state to '" + aIsChecked + "' for " +
prettyName(aID);
}
};
}
function stateChangeOnFileInput(aID, aAttr, aValue,
@ -96,7 +96,7 @@
this.invoke = function stateChangeOnFileInput_invoke() {
this.fileControlNode.setAttribute(aAttr, aValue);
}
};
this.eventSeq = [
new stateChangeChecker(aState, aIsExtraState, aIsEnabled, this.fileControl),
@ -105,7 +105,7 @@
this.getID = function stateChangeOnFileInput_getID() {
return "inherited state change on file input on attribute '" + aAttr + "' change";
}
};
}
function dupeStateChange(aID, aAttr, aValue,
@ -117,11 +117,11 @@
this.invoke = function dupeStateChange_invoke() {
getNode(aID).setAttribute(aAttr, aValue);
getNode(aID).setAttribute(aAttr, aValue);
}
};
this.getID = function dupeStateChange_getID() {
return "duped state change events";
}
};
}
function oppositeStateChange(aID, aAttr, aState, aIsExtraState) {
@ -134,11 +134,11 @@
this.invoke = function oppositeStateChange_invoke() {
getNode(aID).setAttribute(aAttr, "false");
getNode(aID).setAttribute(aAttr, "true");
}
};
this.getID = function oppositeStateChange_getID() {
return "opposite state change events";
}
};
}
/**
@ -159,11 +159,11 @@
getNode(aID).setAttribute(aARIAAttr, aValue);
getNode(aID).setAttribute(aAttr, aValue);
}
}
};
this.getID = function echoingStateChange_getID() {
return "enchoing ARIA and native attributes change";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -48,11 +48,11 @@
this.invoke = function removeChildSpan_invoke() {
// remove HTML span, a first child of the node
this.DOMNode.firstChild.remove();
}
};
this.getID = function removeChildSpan_getID() {
return "Remove inaccessible span containing accessible nodes" + prettyName(aID);
}
};
}
/**
@ -86,12 +86,12 @@
sSpan.textContent = "22";
topSpan.appendChild(sSpan);
}
}
};
this.getID = function insertChildSpan_getID() {
return "Insert inaccessible span containing accessibles" +
prettyName(aID);
}
};
}
/**
@ -108,12 +108,12 @@
getAccessible(childDiv);
this.DOMNode.removeChild(childDiv);
}
};
this.getID = function removeChildDiv_getID() {
return "Remove accessible div from the middle of text accessible " +
prettyName(aID);
}
};
}
/**
@ -125,12 +125,12 @@
this.invoke = function insertChildDiv_invoke() {
var childDiv = document.createElement("div");
this.DOMNode.insertBefore(childDiv, this.DOMNode.childNodes[1]);
}
};
this.getID = function insertChildDiv_getID() {
return "Insert accessible div into the middle of text accessible " +
prettyName(aID);
}
};
}
/**
@ -148,12 +148,12 @@
while (this.DOMNode.firstChild)
this.DOMNode.firstChild.remove();
}
}
};
this.getID = function removeChildren_getID() {
return "remove children of " + prettyName(aID) +
(aLastToFirst ? " from last to first" : " from first to last");
}
};
}
/**
@ -170,12 +170,12 @@
this.DOMNode.setSelectionRange(aStart, aEnd);
synthesizeKey("VK_DELETE", {});
}
};
this.getID = function removeTextFromInput_getID() {
return "Remove text from " + aStart + " to " + aEnd + " for " +
prettyName(aID);
}
};
}
/**
@ -190,11 +190,11 @@
this.invoke = function insertTextIntoInput_invoke() {
this.DOMNode.focus();
synthesizeKey("a", {});
}
};
this.getID = function insertTextIntoInput_getID() {
return "Insert text to " + aStart + " for " + prettyName(aID);
}
};
}
/**
@ -213,12 +213,12 @@
selection.addRange(range);
synthesizeKey("VK_DELETE", {});
}
};
this.getID = function removeTextFromEditable_getID() {
return "Remove text from " + aStart + " to " + aEnd + " for " +
prettyName(aID);
}
};
this.textNode = getNode(aTextNode);
}

Просмотреть файл

@ -50,13 +50,13 @@
this.invoke = function changeText_invoke() {
this.textNode.data = aValue;
}
};
this.getID = function changeText_getID() {
return "change text '" + shortenString(this.textData) + "' -> '" +
shortenString(this.textNode.data) + "' for " +
prettyName(this.containerNode);
}
};
}
function expStr(x, doublings) {

Просмотреть файл

@ -45,7 +45,7 @@
// spellchecker.enableRealTimeSpell = true;
this.DOMNode.value = "valid text inalid tixt";
}
};
this.finalCheck = function spelledTextInvoker_finalCheck() {
var defAttrs = buildDefaultTextAttrs(this.DOMNode, kInputFontSize,
@ -62,11 +62,11 @@
testTextAttrs(aID, 11, misspelledAttrs, defAttrs, 11, 17);
testTextAttrs(aID, 17, attrs, defAttrs, 17, 18);
testTextAttrs(aID, 18, misspelledAttrs, defAttrs, 18, 22);
}
};
this.getID = function spelledTextInvoker_getID() {
return "text attribute change for misspelled text";
}
};
}
/**

Просмотреть файл

@ -43,7 +43,7 @@
// Note: this should always fire an EVENT_VALUE_CHANGE
if (aValuetext != undefined)
this.DOMNode.setAttribute("aria-valuetext", aValuetext);
}
};
this.check = function changeARIAValue_check() {
var acc = getAccessible(aNodeOrID, [nsIAccessibleValue]);
@ -54,11 +54,11 @@
// aria-valuetext takes precedence over aria-valuenow in gecko.
is(acc.value, (aValuetext != undefined) ? aValuetext : aValuenow,
"Wrong value of " + prettyName(aNodeOrID));
}
};
this.getID = function changeARIAValue_getID() {
return prettyName(aNodeOrID) + " value changed";
}
};
}
function changeValue(aID, aValue) {
@ -69,16 +69,16 @@
this.invoke = function changeValue_invoke() {
this.DOMNode.value = aValue;
}
};
this.check = function changeValue_check() {
var acc = getAccessible(this.DOMNode);
is(acc.value, aValue, "Wrong value for " + prettyName(aID));
}
};
this.getID = function changeValue_getID() {
return prettyName(aID) + " value changed";
}
};
}
function changeProgressValue(aID, aValue) {
@ -87,16 +87,16 @@
this.invoke = function changeProgressValue_invoke() {
this.DOMNode.value = aValue;
}
};
this.check = function changeProgressValue_check() {
var acc = getAccessible(this.DOMNode);
is(acc.value, aValue + "%", "Wrong value for " + prettyName(aID));
}
};
this.getID = function changeProgressValue_getID() {
return prettyName(aID) + " value changed";
}
};
}
function changeRangeValue(aID) {
@ -105,16 +105,16 @@
this.invoke = function changeRangeValue_invoke() {
synthesizeMouse(getNode(aID), 5, 5, { });
}
};
this.finalCheck = function changeRangeValue_finalCheck() {
var acc = getAccessible(this.DOMNode);
is(acc.value, "0", "Wrong value for " + prettyName(aID));
}
};
this.getID = function changeRangeValue_getID() {
return prettyName(aID) + " range value changed";
}
};
}
function changeSelectValue(aID, aKey, aValue) {
@ -124,15 +124,15 @@
this.invoke = function changeSelectValue_invoke() {
getNode(aID).focus();
synthesizeKey(aKey, {}, window);
}
};
this.finalCheck = function changeSelectValue_finalCheck() {
is(getAccessible(aID).value, aValue, "Wrong value for " + prettyName(aID));
}
};
this.getID = function changeSelectValue_getID() {
return `${prettyName(aID)} closed select value change on '${aKey}'' key press`;
}
};
}
// enableLogging("DOMEvents");

Просмотреть файл

@ -28,7 +28,7 @@
this.dialog = window.openDialog("about:mozilla",
"AboutMozilla",
"chrome,width=600,height=600");
}
};
this.finalCheck = function openWnd_finalCheck() {
var app = getApplicationAccessible();
@ -36,11 +36,11 @@
"Wrong focused child");
this.dialog.close();
}
};
this.getID = function openWnd_getID() {
return "focusedChild for application accessible";
}
};
function getDialogAccessible(aInvoker) {
return getAccessible(aInvoker.dialog.document);
@ -56,7 +56,7 @@
gQueue.push(new openWnd());
gQueue.onFinish = function() { disableLogging(); }
gQueue.onFinish = function() { disableLogging(); };
gQueue.invoke(); // Will call SimpleTest.finish();
}

Просмотреть файл

@ -29,11 +29,11 @@
this.invoke = function takeFocusInvoker_invoke() {
this.accessible.takeFocus();
}
};
this.getID = function takeFocusInvoker_getID() {
return "takeFocus for " + prettyName(aID);
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -6,18 +6,18 @@ const nsIDOMKeyEvent = Components.interfaces.nsIDOMKeyEvent;
function grid(aTableIdentifier) {
this.getRowCount = function getRowCount() {
return this.table.rows.length - (this.table.tHead ? 1 : 0);
}
};
this.getColsCount = function getColsCount() {
return this.table.rows[0].cells.length;
}
};
this.getRowAtIndex = function getRowAtIndex(aIndex) {
return this.table.rows[this.table.tHead ? aIndex + 1 : aIndex];
}
};
this.getMaxIndex = function getMaxIndex() {
return this.getRowCount() * this.getColsCount() - 1;
}
};
this.getCellAtIndex = function getCellAtIndex(aIndex) {
var colsCount = this.getColsCount();
@ -27,7 +27,7 @@ function grid(aTableIdentifier) {
var row = this.getRowAtIndex(rowIdx);
return row.cells[colIdx];
}
};
this.getIndexByCell = function getIndexByCell(aCell) {
var colIdx = aCell.cellIndex;
@ -38,7 +38,7 @@ function grid(aTableIdentifier) {
var colsCount = this.getColsCount();
return rowIdx * colsCount + colIdx;
}
};
this.getCurrentCell = function getCurrentCell() {
var rowCount = this.table.rows.length;
@ -51,19 +51,19 @@ function grid(aTableIdentifier) {
}
}
return null;
}
};
this.initGrid = function initGrid() {
this.table.addEventListener("keypress", this);
this.table.addEventListener("click", this);
}
};
this.handleEvent = function handleEvent(aEvent) {
if (aEvent instanceof nsIDOMKeyEvent)
this.handleKeyEvent(aEvent);
else
this.handleClickEvent(aEvent);
}
};
this.handleKeyEvent = function handleKeyEvent(aEvent) {
if (aEvent.target.localName != "td")
@ -115,7 +115,7 @@ function grid(aTableIdentifier) {
}
break;
}
}
};
this.handleClickEvent = function handleClickEvent(aEvent) {
if (aEvent.target.localName != "td")
@ -129,7 +129,7 @@ function grid(aTableIdentifier) {
cell.setAttribute("tabindex", "0");
cell.focus();
}
}
};
this.table = getNode(aTableIdentifier);
this.initGrid();

Просмотреть файл

@ -24,15 +24,15 @@ function focusLink(aID, aSelectedAfter) {
testStates(aID, expectedStates, 0, unexpectedStates, 0);
this.node.focus();
}
};
this.finalCheck = function focusLink_finalCheck() {
var expectedStates = (aSelectedAfter ? STATE_FOCUSABLE | STATE_FOCUSED : 0);
var unexpectedStates = (!aSelectedAfter ? STATE_FOCUSABLE | STATE_FOCUSED : 0);
testStates(aID, expectedStates, 0, unexpectedStates, 0);
}
};
this.getID = function focusLink_getID() {
return "focus hyperlink " + prettyName(aID);
}
};
}

Просмотреть файл

@ -33,7 +33,7 @@
span.textContent = " text ";
this.containerNode.appendChild(span);
}
}
};
this.finalCheck = function addLinks_finalCheck() {
// getLinkAt and getLinkIndex.
@ -45,11 +45,11 @@
var linkIdx = htAcc.getLinkIndex(link);
is(linkIdx, jdx, "Wrong link index for '" + aContainerID + "'!");
}
}
};
this.getID = function addLinks_getID() {
return "Add links for '" + aContainerID + "'";
}
};
}
function updateText(aContainerID) {
@ -68,16 +68,16 @@
"Wrong intial text offsets!");
this.text.DOMNode.appendData(" my");
}
};
this.finalCheck = function updateText_finalCheck() {
is(this.container.getLinkIndexAtOffset(this.textLen), -1,
"Text offsets weren't updated!");
}
};
this.getID = function updateText_getID() {
return "update text for '" + aContainerID + "'";
}
};
}
/**
@ -98,18 +98,18 @@
this.invoke = function removeChild_invoke() {
this.containerNode.removeChild(this.childNode);
}
};
this.finalCheck = function removeChild_finalCheck() {
is(this.container.getText(0, -1), aFinalText,
"Wrong text after child removal");
is(this.container.characterCount, aFinalText.length,
"Wrong text after child removal");
}
};
this.getID = function removeChild_getID() {
return "check text after removing child from '" + aContainerID + "'";
}
};
}
function removeFirstChild(aContainer) {
@ -122,17 +122,17 @@
is(this.ht.linkCount, 2, "Wrong embedded objects count before removal");
getNode(aContainer).removeChild(getNode(aContainer).firstElementChild);
}
};
this.finalCheck = function removeFirstChild_finalCheck() {
// check list index before link count
is(this.ht.getLinkIndex(this.ht.firstChild), 0, "Wrong child index");
is(this.ht.linkCount, 1, "Wrong embedded objects count after removal");
}
};
this.getID = function removeFirstChild_getID() {
return "Remove first child and check embedded object indeces";
}
};
}
function removeLastChild(aContainer) {
@ -145,7 +145,7 @@
is(this.ht.linkCount, 1, "Wrong embedded objects count before removal");
getNode(aContainer).removeChild(getNode(aContainer).lastElementChild);
}
};
this.finalCheck = function removeLastChild_finalCheck() {
is(this.ht.linkCount, 0, "Wrong embedded objects count after removal");
@ -155,11 +155,11 @@
link = this.ht.getLinkAt(0);
} catch (e) { }
ok(!link, "No embedded object is expected");
}
};
this.getID = function removeLastChild_getID() {
return "Remove last child and try its embedded object";
}
};
}
// gA11yEventDumpToConsole = true; // debug stuff

Просмотреть файл

@ -381,7 +381,7 @@ var ContentMessages = {
rule: (aRule || "Simple"),
adjustRange: true
}
}
};
},
moveOrAdjustDown: function moveOrAdjustUp(aRule) {
@ -394,7 +394,7 @@ var ContentMessages = {
rule: (aRule || "Simple"),
adjustRange: true
}
}
};
},
androidScrollForward: function adjustUp() {
@ -554,7 +554,7 @@ ExpectedPresent.prototype.is = function(aReceived, aInfo) {
for (var presenter of ["b2g", "android"]) {
if (!this.options["no_" + presenter]) {
var todo = this.options.todo || this.options[presenter + "_todo"]
var todo = this.options.todo || this.options[presenter + "_todo"];
SimpleTest[todo ? "todo" : "ok"].apply(
SimpleTest, this.lazyCompare(received[presenter],
this.json[presenter], aInfo + " (" + presenter + ")"));
@ -571,7 +571,7 @@ ExpectedPresent.prototype.extract_presenters = function(aReceived) {
}
}
return received
return received;
};
ExpectedPresent.prototype.ignore = function(aMessage) {

Просмотреть файл

@ -304,7 +304,7 @@
closeBrowserWindow();
SimpleTest.finish();
});
}, doc.defaultView)
}, doc.defaultView);
});
iframe.src = "data:text/html;charset=utf-8," + doc.defaultView.frameContents;
doc.getElementById("appframe").appendChild(iframe);
@ -325,7 +325,7 @@
["dom.mozBrowserFramesEnabled", true],
["browser.pagethumbnails.capturing_disabled", true]
]
}, doTest)
}, doTest);
},
getRootDirectory(window.location.href) + "doc_content_integration.html");
});

Просмотреть файл

@ -25,7 +25,7 @@
"initial current mode is correct");
AccessFu.Input.quickNavMode.next();
_expectMode(aNextMode, AccessFuTest.nextTest);
}
};
}
function prevMode(aCurrentMode, aNextMode) {
@ -34,7 +34,7 @@
"initial current mode is correct");
AccessFu.Input.quickNavMode.previous();
_expectMode(aNextMode, AccessFuTest.nextTest);
}
};
}
function setMode(aModeIndex, aExpectedMode) {
@ -44,7 +44,7 @@
function() {
_expectMode(aExpectedMode, AccessFuTest.nextTest);
});
}
};
}
function reconfigureModes() {

Просмотреть файл

@ -33,7 +33,7 @@
gQueue.onFinish = function onFinish() {
closeBrowserWindow();
}
};
queueTraversalSequence(gQueue, docAcc, TraversalRules.Heading, null,
["heading-1", "heading-2", "heading-3", "heading-5"]);

Просмотреть файл

@ -210,9 +210,9 @@
testName("ph_text3", "a label");
// Test equation image
testName("img_eq", "x^2 + y^2 + z^2")
testName("input_img_eq", "x^2 + y^2 + z^2")
testName("txt_eq", "x^2 + y^2 + z^2")
testName("img_eq", "x^2 + y^2 + z^2");
testName("input_img_eq", "x^2 + y^2 + z^2");
testName("txt_eq", "x^2 + y^2 + z^2");
// //////////////////////////////////////////////////////////////////////
// tests for duplicate announcement of content

Просмотреть файл

@ -31,7 +31,7 @@
li.setAttribute("id", "li_start");
li.textContent = "list start";
getNode("list").insertBefore(li, getNode("li_end"));
}
};
this.finalCheck = function bulletUpdate_finalCheck() {
testName("li_start", "1. list start");
@ -44,11 +44,11 @@
testName("li_start", kDiscBulletText + "list start");
testName("li_end", kDiscBulletText + "list end");
}
};
this.getID = function bulletUpdate_getID() {
return "Update bullet of list items";
}
};
}
var gQueue = null;

Просмотреть файл

@ -35,7 +35,7 @@ var HeadersTraversalRule =
},
QueryInterface: XPCOMUtils.generateQI([nsIAccessibleTraversalRule])
}
};
/**
* Traversal rule for all focusable nodes or leafs.
@ -511,7 +511,7 @@ function dumpTraversalSequence(aPivot, aRule) {
if (aPivot.moveFirst(aRule)) {
do {
sequence.push("'" + prettyName(aPivot.position) + "'");
} while (aPivot.moveNext(aRule))
} while (aPivot.moveNext(aRule));
}
SimpleTest.info("\n[" + sequence.join(", ") + "]\n");
}

Просмотреть файл

@ -41,7 +41,7 @@
gQueue.onFinish = function onFinish() {
closeBrowserWindow();
}
};
queueTraversalSequence(gQueue, docAcc, HeadersTraversalRule, null,
["heading-1-1", "heading-2-1", "heading-2-2"]);

Просмотреть файл

@ -33,7 +33,7 @@
gQueue.onFinish = function onFinish() {
closeBrowserWindow();
}
};
gQueue.push(new setVCPosInvoker(docAcc, null, null,
getAccessible(doc.getElementById("paragraph-1"))));

Просмотреть файл

@ -45,18 +45,18 @@
function() {
currentTabDocument().defaultView.alert("hello");
}, 0);
}
};
this.check = function showAlert_finalCheck(aEvent) {
var dialog = aEvent.accessible.DOMNode;
var info = dialog.ui.infoBody;
testRelation(info, RELATION_DESCRIPTION_FOR, dialog);
testRelation(dialog, RELATION_DESCRIBED_BY, info);
}
};
this.getID = function showAlert_getID() {
return "show alert";
}
};
}
// gA11yEventDumpToConsole = true; // debug
@ -68,7 +68,7 @@
gQueue.onFinish = function() {
synthesizeKey("VK_RETURN", {}, browserWindow());
closeBrowserWindow();
}
};
gQueue.invoke(); // will call SimpleTest.finish()
}

Просмотреть файл

@ -68,18 +68,18 @@
document.body.appendChild(this.dependentNode);
document.body.appendChild(this.hostNode);
}
}
};
this.finalCheck = function insertRelated_finalCheck() {
testRelation(this.dependentNode, aDependentRelation, this.hostNode);
if (aHostRelation)
testRelation(this.hostNode, aHostRelation, this.dependentNode);
}
};
this.getID = function insertRelated_getID() {
return "Insert " + aHostRelAttr + "='" + aDependentID + "' node" +
(aInsertHostFirst ? " before" : "after") + " dependent node";
}
};
}
/**
@ -102,16 +102,16 @@
testRelation(aElmID, RELATION_LABELLED_BY, aLabelID);
this.containerNode.style.overflow = "visible";
}
};
this.finalCheck = function recreateRelatives_finalCheck() {
testRelation(aLabelID, RELATION_LABEL_FOR, aElmID);
testRelation(aElmID, RELATION_LABELLED_BY, aLabelID);
}
};
this.getID = function recreateRelatives_getID() {
return "recreate relatives ";
}
};
}
// gA11yEventDumpToConsole = true; // debug

Просмотреть файл

@ -25,18 +25,18 @@
this.invoke = function focusARIAItem_invoke() {
this.DOMNode.focus();
}
};
this.check = function focusARIAItem_check(aEvent) {
testStates(this.DOMNode, aIsSelected ? STATE_SELECTED : 0, 0,
aIsSelected ? 0 : STATE_SELECTED);
}
};
this.getID = function focusARIAItem_getID() {
return "Focused ARIA widget item with aria-selected='" +
(aIsSelected ? "true', should" : "false', shouldn't") +
" have selected state on " + prettyName(aID);
}
};
}
function focusActiveDescendantItem(aItemID, aWidgetID, aIsSelected) {
@ -46,18 +46,18 @@
this.invoke = function focusActiveDescendantItem_invoke() {
this.widgetDOMNode.setAttribute("aria-activedescendant", aItemID);
this.widgetDOMNode.focus();
}
};
this.check = function focusActiveDescendantItem_check(aEvent) {
testStates(this.DOMNode, aIsSelected ? STATE_SELECTED : 0, 0,
aIsSelected ? 0 : STATE_SELECTED);
}
};
this.getID = function tabActiveDescendant_getID() {
return "ARIA widget item managed by activedescendant " +
(aIsSelected ? "should" : "shouldn't") +
" have the selected state on " + prettyName(aItemID);
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -37,11 +37,11 @@
this.invoke = function loadFile_invoke() {
synthesizeMouse(getNode("link"), 1, 1, {});
}
};
this.getID = function loadFile_getID() {
return "load file: state busy change events on document";
}
};
}
var gQueue = null;

Просмотреть файл

@ -32,7 +32,7 @@
this.invoke = function openComboboxNCheckStates_invoke() {
getNode(aID).focus();
synthesizeKey("VK_DOWN", { altKey: true });
}
};
this.finalCheck = function openComboboxNCheckStates_invoke() {
// Expanded state on combobox.
@ -40,11 +40,11 @@
// Floating state on combobox list.
testStates(this.comboboxList, STATE_FLOATING);
}
};
this.getID = function openComboboxNCheckStates_getID() {
return "open combobox and test states";
}
};
}
// gA11yEventDumpToConsole = true;

Просмотреть файл

@ -29,16 +29,16 @@
this.invoke = function addChild_invoke() {
this.childNode = document.createElement("div");
this.containerNode.appendChild(this.childNode);
}
};
this.finalCheck = function addChild_finalCheck() {
// no stale state should be set
testStates(this.childNode, 0, 0, 0, EXT_STATE_STALE);
}
};
this.getID = function addChild_getID() {
return "add child for " + prettyName(aContainerID);
}
};
}
function removeChildChecker(aInvoker) {
@ -48,7 +48,7 @@
this.check = function removeChildChecker_check() {
// stale state should be set
testStates(aInvoker.child, 0, EXT_STATE_STALE);
}
};
}
function removeChild(aContainerID) {
@ -64,11 +64,11 @@
this.child = getAccessible(childNode);
this.containerNode.removeChild(childNode);
}
};
this.getID = function removeChild_getID() {
return "remove child from " + prettyName(aContainerID);
}
};
}
// gA11yEventDumpToConsole = true; //debugging

Просмотреть файл

@ -302,7 +302,7 @@ function testWordAt(aElement, aWordIndex, aText, aToDoFlag) {
acc.getTextAtOffset(endOffsetObj.value, BOUNDARY_WORD_END,
startOffsetObj, endOffsetObj);
if (startOffsetObj.value != textLength)
endWordOffset = startOffsetObj.value
endWordOffset = startOffsetObj.value;
if (endWordOffset <= startWordOffset) {
todo(false,

Просмотреть файл

@ -66,7 +66,7 @@
}
return true;
}
};
Object.defineProperty(this, "offset", { get: function() { return this.mOffset; }
});
@ -217,7 +217,7 @@
});
this.isFakeLine = function line_isFakeLine() {
return aIndex < 0 || aIndex >= aLines.length;
}
};
Object.defineProperty(this, "lastWord", { get: function() {
if (aIndex < 0)
@ -243,7 +243,7 @@
this.isLastWord = function line_isLastWord(aWord) {
var lastWord = this.lastWord;
return lastWord.start == aWord.start && lastWord.end == aWord.end;
}
};
Object.defineProperty(this, "lineStartFailures", { get: function() {
if (aIndex < 0 || aIndex >= aLines.length)
@ -309,10 +309,10 @@
var start = this.start, end = this.end;
return "'" + aLine.wholeText.substring(start, end) +
"' at [" + start + ", " + end + "]";
}
};
this.isFakeStartWord = function() { return aIndex < 0; }
this.isFakeEndWord = function() { return aIndex >= aWords.length; }
this.isFakeStartWord = function() { return aIndex < 0; };
this.isFakeEndWord = function() { return aIndex >= aWords.length; };
}
/**
@ -348,16 +348,16 @@
func.call(null, kCaretOffset, boundary, text, startOffset, endOffset,
aID, isOk1, isOk2, isOk3);
}
}
};
this.getID = function genericMoveTo_getID() {
return "move to " + this.offsetDescr;
}
};
this.noTests = function tmpl_moveTo_noTests() {
return ("debugOffset" in aCharIter) &&
(aCharIter.debugOffset != this.offset);
}
};
this.offsetDescr = aCharIter.offsetDescr;
this.tests = this.noTests() ? null : aCharIter.tests;

Просмотреть файл

@ -23,21 +23,21 @@
this.invoke = function insertBefore_invoke() {
testText(aId, 0, -1, aTextBefore);
getNode(aId).insertBefore(aEl, getNode(aId).firstChild);
}
};
this.finalCheck = function insertBefore_finalCheck() {
testText(aId, aStartIdx, aEndIdx, aTextAfter);
}
};
this.getID = function insertTextBefore_getID() {
return "insert " + prettyName(aEl) + " before";
}
};
}
function insertTextBefore(aId, aTextBefore, aText) {
var el = document.createTextNode(aText);
this.__proto__ = new insertBefore(aId, el, aTextBefore,
aText + aTextBefore, 0, -1)
aText + aTextBefore, 0, -1);
}
function insertImgBefore(aId, aTextBefore) {
@ -46,12 +46,12 @@
el.setAttribute("alt", "mozilla");
this.__proto__ = new insertBefore(aId, el, aTextBefore,
kEmbedChar + aTextBefore, 0, -1)
kEmbedChar + aTextBefore, 0, -1);
}
function insertTextBefore2(aId) {
var el = document.createTextNode("hehe");
this.__proto__ = new insertBefore(aId, el, "ho", "ho", 4, -1)
this.__proto__ = new insertBefore(aId, el, "ho", "ho", 4, -1);
}
var gQueue = null;

Просмотреть файл

@ -49,7 +49,7 @@
var invoker =
new moveCaretToDOMPoint(textAcc, node, nodeOffset, textOffset,
((i == 0) ? aFocusNode : null),
testCaretOffsets.bind(null, textList))
testCaretOffsets.bind(null, textList));
gQueue.push(invoker);
}
}
@ -122,7 +122,7 @@
gQueue.onFinish = function() {
turnCaretBrowsing(false);
}
};
gQueue.invoke(); // Will call SimpleTest.finish();
}

Просмотреть файл

@ -28,7 +28,7 @@
this.invoke = function addSelection_invoke() {
this.hyperText.addSelection(aStartOffset, aEndOffset);
}
};
this.finalCheck = function addSelection_finalCheck() {
is(this.hyperText.selectionCount, 1,
@ -40,11 +40,11 @@
"addSelection: Wrong start offset for " + aID);
is(endOffset.value, aEndOffset,
"addSelection: Wrong end offset for " + aID);
}
};
this.getID = function addSelection_getID() {
return "nsIAccessibleText::addSelection test for " + aID;
}
};
}
function changeSelection(aID, aStartOffset, aEndOffset) {
@ -57,7 +57,7 @@
this.invoke = function changeSelection_invoke() {
this.hyperText.setSelectionBounds(0, aStartOffset, aEndOffset);
}
};
this.finalCheck = function changeSelection_finalCheck() {
is(this.hyperText.selectionCount, 1,
@ -69,11 +69,11 @@
"setSelectionBounds: Wrong start offset for " + aID);
is(endOffset.value, aEndOffset,
"setSelectionBounds: Wrong end offset for " + aID);
}
};
this.getID = function changeSelection_getID() {
return "nsIAccessibleText::setSelectionBounds test for " + aID;
}
};
}
function removeSelection(aID) {
@ -85,16 +85,16 @@
this.invoke = function removeSelection_invoke() {
this.hyperText.removeSelection(0);
}
};
this.finalCheck = function removeSelection_finalCheck() {
is(this.hyperText.selectionCount, 0,
"removeSelection: Wrong selection count for " + aID);
}
};
this.getID = function removeSelection_getID() {
return "nsIAccessibleText::removeSelection test for " + aID;
}
};
}
function changeDOMSelection(aID, aNodeID1, aNodeOffset1,
@ -112,7 +112,7 @@
range.setStart(getNode(aNodeID1), aNodeOffset1);
range.setEnd(getNode(aNodeID2), aNodeOffset2);
sel.addRange(range);
}
};
this.finalCheck = function changeDOMSelection_finalCheck() {
for (var i = 0; i < aTests.length; i++) {
@ -127,11 +127,11 @@
is(endOffset.value, aTests[i][2],
"setSelectionBounds: Wrong end offset for " + aID);
}
}
};
this.getID = function changeDOMSelection_getID() {
return "DOM selection change for " + aID;
}
};
}
function onfocusEventSeq(aID) {

Просмотреть файл

@ -41,11 +41,11 @@
}
ok(exceptionCaught, "No selection was expected for " + aPrevID);
}
};
this.getID = function changeSelection_getID() {
return "Hidden selection check for " + aPrevID;
}
};
}
/**

Просмотреть файл

@ -19,7 +19,7 @@
l.href = "http://www.mozilla.org";
l.textContent = "Yet another link to mozilla";
document.documentElement.appendChild(l);
}
};
</script>
</head>
<body>

Просмотреть файл

@ -24,7 +24,7 @@
{ TEXT_LEAF: [] }
] }
] }
] }
] };
testAccessibleTree("menu", tree);
// Menuitem with explicit no popup.
@ -36,7 +36,7 @@
{ TEXT_LEAF: [] }
] }
] }
] }
] };
testAccessibleTree("menu_nopopup", tree);
// Menuitem with popup.
@ -48,7 +48,7 @@
{ TEXT_LEAF: [] }
] }
] }
] }
] };
testAccessibleTree("menu_popup", tree);
SimpleTest.finish();

Просмотреть файл

@ -36,16 +36,16 @@
this.invoke = function focusAnchor_invoke() {
this.linkNode.focus();
}
};
this.check = function focusAnchor_check(aEvent) {
todo_is(this.link, aEvent.accessible,
"Focus should be fired against new link accessible!");
}
};
this.getID = function focusAnchor_getID() {
return "focus a:focus{overflow:scroll} #1";
}
};
}
function tabAnchor(aID) {
@ -58,16 +58,16 @@
this.invoke = function tabAnchor_invoke() {
synthesizeKey("VK_TAB", { shiftKey: false });
}
};
this.check = function tabAnchor_check(aEvent) {
todo_is(this.link, aEvent.accessible,
"Focus should be fired against new link accessible!");
}
};
this.getID = function tabAnchor_getID() {
return "focus a:focus{overflow:scroll} #2";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -35,7 +35,7 @@
getNode("a").textContent = "link";
getNode("input").value = "hello";
getNode("input").focus();
}
};
this.finalCheck = function showARIADialog_finalCheck() {
var tree = {
@ -51,11 +51,11 @@
]
};
testAccessibleTree(aID, tree);
}
};
this.getID = function showARIADialog_getID() {
return "show ARIA dialog";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -47,7 +47,7 @@
getNode("t1_container").
setAttribute("aria-owns", "t1_button t1_subdiv");
}
};
this.finalCheck = function setARIAOwns_finalCheck() {
// children are swapped again, button and subdiv are appended to
@ -59,11 +59,11 @@
{ SECTION: [ ] } // subdiv from the subtree, ARIA owned
] };
testAccessibleTree("t1_container", tree);
}
};
this.getID = function setARIAOwns_getID() {
return "Change @aria-owns attribute";
}
};
}
function removeARIAOwns() {
@ -80,7 +80,7 @@
this.invoke = function removeARIAOwns_invoke() {
getNode("t1_container").removeAttribute("aria-owns");
}
};
this.finalCheck = function removeARIAOwns_finalCheck() {
// children follow the DOM order
@ -92,11 +92,11 @@
] }
] };
testAccessibleTree("t1_container", tree);
}
};
this.getID = function removeARIAOwns_getID() {
return "Remove @aria-owns attribute";
}
};
}
function setARIAOwns() {
@ -111,7 +111,7 @@
this.invoke = function setARIAOwns_invoke() {
getNode("t1_container").
setAttribute("aria-owns", "t1_button t1_subdiv");
}
};
this.finalCheck = function setARIAOwns_finalCheck() {
// children are swapped again, button and subdiv are appended to
@ -123,11 +123,11 @@
{ SECTION: [ ] } // subdiv from the subtree, ARIA owned
] };
testAccessibleTree("t1_container", tree);
}
};
this.getID = function setARIAOwns_getID() {
return "Set @aria-owns attribute";
}
};
}
function addIdToARIAOwns() {
@ -140,7 +140,7 @@
this.invoke = function addIdToARIAOwns_invoke() {
getNode("t1_container").
setAttribute("aria-owns", "t1_button t1_subdiv t1_group");
}
};
this.finalCheck = function addIdToARIAOwns_finalCheck() {
// children are swapped again, button and subdiv are appended to
@ -153,11 +153,11 @@
{ GROUPING: [ ] } // group from outside, t1_group
] };
testAccessibleTree("t1_container", tree);
}
};
this.getID = function addIdToARIAOwns_getID() {
return "Add id to @aria-owns attribute value";
}
};
}
function appendEl() {
@ -169,9 +169,9 @@
this.invoke = function appendEl_invoke() {
var div = document.createElement("div");
div.setAttribute("id", "t1_child3");
div.setAttribute("role", "radio")
div.setAttribute("role", "radio");
getNode("t1_container").appendChild(div);
}
};
this.finalCheck = function appendEl_finalCheck() {
// children are invalidated, they includes aria-owns swapped kids and
@ -185,11 +185,11 @@
{ GROUPING: [ ] } // ARIA owned, t1_group
] };
testAccessibleTree("t1_container", tree);
}
};
this.getID = function appendEl_getID() {
return "Append child under @aria-owns element";
}
};
}
function removeEl() {
@ -202,7 +202,7 @@
this.invoke = function removeEl_invoke() {
// remove a container of t1_subdiv
getNode("t1_span").remove();
}
};
this.finalCheck = function removeEl_finalCheck() {
// subdiv should go away
@ -214,11 +214,11 @@
{ GROUPING: [ ] } // ARIA owned, t1_group
] };
testAccessibleTree("t1_container", tree);
}
};
this.getID = function removeEl_getID() {
return "Remove a container of ARIA owned element";
}
};
}
function removeId() {
@ -230,7 +230,7 @@
this.invoke = function removeId_invoke() {
getNode("t1_group").removeAttribute("id");
}
};
this.finalCheck = function removeId_finalCheck() {
var tree =
@ -240,11 +240,11 @@
{ PUSHBUTTON: [ ] } // ARIA owned, t1_button
] };
testAccessibleTree("t1_container", tree);
}
};
this.getID = function removeId_getID() {
return "Remove ID from ARIA owned element";
}
};
}
function setId() {
@ -256,7 +256,7 @@
this.invoke = function setId_invoke() {
getNode("t1_grouptmp").setAttribute("id", "t1_group");
}
};
this.finalCheck = function setId_finalCheck() {
var tree =
@ -267,11 +267,11 @@
{ GROUPING: [ ] } // ARIA owned, t1_group, previously t1_grouptmp
] };
testAccessibleTree("t1_container", tree);
}
};
this.getID = function setId_getID() {
return "Set ID that is referred by ARIA owns";
}
};
}
/**
@ -291,18 +291,18 @@
testAccessibleTree("t2_container1", tree);
getNode("t2_container2").removeChild(getNode("t2_container3"));
}
};
this.finalCheck = function removeA11eteiner_finalCheck() {
var tree =
{ SECTION: [
] };
testAccessibleTree("t2_container1", tree);
}
};
this.getID = function removeA11eteiner_getID() {
return "Remove an accessible DOM element containing an element referred by ARIA owns";
}
};
}
/**
@ -317,7 +317,7 @@
this.invoke = function stealFromOtherARIAOwns_invoke() {
getNode("t3_container3").setAttribute("aria-owns", "t3_child t3_child2");
}
};
this.finalCheck = function stealFromOtherARIAOwns_finalCheck() {
var tree =
@ -338,11 +338,11 @@
] }
] };
testAccessibleTree("t3_container3", tree);
}
};
this.getID = function stealFromOtherARIAOwns_getID() {
return "Steal an element from other ARIA owns element";
}
};
}
function appendElToRecacheChildren() {
@ -352,9 +352,9 @@
this.invoke = function appendElToRecacheChildren_invoke() {
var div = document.createElement("div");
div.setAttribute("role", "radio")
div.setAttribute("role", "radio");
getNode("t3_container3").appendChild(div);
}
};
this.finalCheck = function appendElToRecacheChildren_finalCheck() {
var tree =
@ -368,11 +368,11 @@
{ CHECKBUTTON: [ ] } // ARIA owned
] };
testAccessibleTree("t3_container3", tree);
}
};
this.getID = function appendElToRecacheChildren_getID() {
return "Append a child under @aria-owns element to trigger children recache";
}
};
}
function showHiddenElement() {
@ -388,7 +388,7 @@
testAccessibleTree("t4_container1", tree);
getNode("t4_child1").style.display = "block";
}
};
this.finalCheck = function showHiddenElement_finalCheck() {
var tree =
@ -397,11 +397,11 @@
{ RADIOBUTTON: [] }
] };
testAccessibleTree("t4_container1", tree);
}
};
this.getID = function showHiddenElement_getID() {
return "Show hidden ARIA owns referred element";
}
};
}
function rearrangeARIAOwns(aContainer, aAttr, aIdList, aRoleList) {
@ -417,7 +417,7 @@
this.invoke = function rearrangeARIAOwns_invoke() {
getNode(aContainer).setAttribute("aria-owns", aAttr);
}
};
this.finalCheck = function rearrangeARIAOwns_finalCheck() {
var tree = { SECTION: [ ] };
@ -427,11 +427,11 @@
tree.SECTION.push(ch);
}
testAccessibleTree(aContainer, tree);
}
};
this.getID = function rearrangeARIAOwns_getID() {
return `Rearrange @aria-owns attribute to '${aAttr}'`;
}
};
}
function removeNotARIAOwnedEl(aContainer, aChild) {
@ -449,7 +449,7 @@
testAccessibleTree(aContainer, tree);
getNode(aContainer).removeChild(getNode(aChild));
}
};
this.finalCheck = function removeNotARIAOwnedEl_finalCheck() {
var tree = {
@ -458,11 +458,11 @@
]
};
testAccessibleTree(aContainer, tree);
}
};
this.getID = function removeNotARIAOwnedEl_getID() {
return `remove not ARIA owned child`;
}
};
}
function setARIAOwnsOnElToRemove(aParent, aChild) {
@ -474,11 +474,11 @@
getNode(aChild).setAttribute("aria-owns", "no_id");
getNode(aParent).removeChild(getNode(aChild));
getNode(aParent).remove();
}
};
this.getID = function setARIAOwnsOnElToRemove_getID() {
return `set ARIA owns on an element, and then remove it, and then remove its parent`;
}
};
}
/**
@ -502,7 +502,7 @@
testAccessibleTree("t8_container", tree);
getNode(t8_container).setAttribute("aria-owns", "t8_span t8_button");
}
};
this.finalCheck = function test8_finalCheck() {
var tree =
@ -515,11 +515,11 @@
{ PUSHBUTTON: [] }
] };
testAccessibleTree("t8_container", tree);
}
};
this.getID = function test8_getID() {
return `Set ARIA owns on inaccessible span element that contains accessible children`;
}
};
}
function test9_prepare() {
@ -540,7 +540,7 @@
el.innerHTML = "<input id='input'>";
document.documentElement.appendChild(el);
<\/script></html>`;
}
};
this.finalCheck = () => {
var tree =
@ -552,11 +552,11 @@
] }
] };
testAccessibleTree("t9_container", tree);
}
};
this.getID = () => {
return `Set ARIA owns on a document (part1)`;
}
};
}
function test9_setARIAOwns() {
@ -570,7 +570,7 @@
this.invoke = () => {
let doc = getNode("t9_container").contentDocument;
doc.body.setAttribute("aria-owns", "input");
}
};
this.finalCheck = () => {
var tree =
@ -581,11 +581,11 @@
] }
] };
testAccessibleTree("t9_container", tree);
}
};
this.getID = () => {
return `Set ARIA owns on a document (part2)`;
}
};
}
function test9_finish() {
@ -599,7 +599,7 @@
// trigger a tree update.
let doc = getNode("t9_container").contentDocument;
doc.body.appendChild(document.createElement("p"));
}
};
this.finalCheck = () => {
var tree =
@ -611,11 +611,11 @@
] }
] };
testAccessibleTree("t9_container", tree);
}
};
this.getID = () => {
return `Set ARIA owns on a document (part3)`;
}
};
}
/**
@ -636,11 +636,11 @@
testAccessibleTree("t10_container", tree);
getNode("t10_owner").remove();
}
};
this.getID = () => {
return "Put aria owned child back when aria owner removed";
}
};
}
function test10_finishTest() {
@ -651,7 +651,7 @@
this.invoke = () => {
// trigger a tree update.
getNode("t10_container").append(document.createElement("p"));
}
};
this.finalCheck = () => {
let tree =
@ -661,11 +661,11 @@
] };
testAccessibleTree("t10_container", tree);
todo(false, "Input accessible has be moved back in the tree");
}
};
this.getID = () => {
return `Put aria owned child back when aria owner removed (finish test)`;
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -29,16 +29,16 @@
this.invoke = function hideBullet_invoke() {
getNode("list").setAttribute("style", "list-style-type: none;");
}
};
this.finalCheck = function hideBullet_finalCheck() {
is(this.liAcc.name, "list element",
"Check that first child of LI is not a bullet.");
}
};
this.getID = function hideBullet_getID() {
return "Hide bullet by setting style to none";
}
};
}
/**
@ -55,16 +55,16 @@
this.invoke = function showBullet_invoke() {
getNode("list").setAttribute("style", "list-style-type: circle;");
}
};
this.finalCheck = function showBullet_finalCheck() {
is(this.liAcc.name, "◦ list element",
"Check that first child of LI is a circle bullet.");
}
};
this.getID = function showBullet_getID() {
return "Show bullet by setting style to circle";
}
};
}
var gQueue = null;

Просмотреть файл

@ -28,16 +28,16 @@
is(getAccessible("parent", null, null, DONOTFAIL_IF_NO_ACC), null, "Check that parent is not accessible.");
is(getAccessible("child", null, null, DONOTFAIL_IF_NO_ACC), null, "Check that child is not accessible.");
getNode("parent").addEventListener("click", dummyListener);
}
};
this.finalCheck = function testAddListener_finalCheck() {
var tree = { TEXT: [] };
testAccessibleTree("parent", tree);
}
};
this.getID = function testAddListener_getID() {
return "Test that show event is sent when click listener is added";
}
};
}
function testRemoveListener() {
@ -47,18 +47,18 @@
this.invoke = function testRemoveListener_invoke() {
getNode("parent").removeEventListener("click", dummyListener);
}
};
this.finalCheck = function testRemoveListener_finalCheck() {
ok(getAccessible("parent", null, null, DONOTFAIL_IF_NO_ACC),
"Parent stays accessible after click event listener is removed");
ok(!getAccessible("child", null, null, DONOTFAIL_IF_NO_ACC),
"Child stays inaccessible");
}
};
this.getID = function testRemoveListener_getID() {
return "Test that hide event is sent when click listener is removed";
}
};
}
var gQueue = null;

Просмотреть файл

@ -36,11 +36,11 @@
docContainer.removeChild(getNode("childDoc"));
docContainer.appendChild(iframe);
}
};
this.getID = function runTest_getID() {
return "check show events are not incorrectly coalesced";
}
};
}
// enableLogging("tree");

Просмотреть файл

@ -19,7 +19,7 @@
function doTest() {
var y = document.getElementById("y");
var oldBody = document.body;
var newBody = document.createElement("body")
var newBody = document.createElement("body");
document.documentElement.insertBefore(newBody, oldBody);
setTimeout(function() {
document.documentElement.removeChild(oldBody);

Просмотреть файл

@ -33,15 +33,15 @@
// ensure we start with no subtree
testAccessibleTree("canvas", { CANVAS: [] });
getNode("dialog").style.display = "block";
}
};
this.finalCheck = function addSubtree_finalCheck() {
testAccessibleTree("dialog", { DIALOG: [] });
}
};
this.getID = function addSubtree_getID() {
return "show canvas subdom";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -41,7 +41,7 @@
this.invoke = function changeScrollRange_invoke() {
this.scrollAreaNode.style.width = "20px";
this.containerNode.appendChild(document.createElement("input"));
}
};
this.finalCheck = function changeScrollRange_finalCheck() {
var accTree =
@ -52,11 +52,11 @@
{ ENTRY: [] } // inserted input
] };
testAccessibleTree(this.container, accTree);
}
};
this.getID = function changeScrollRange_getID() {
return "change scroll range for " + prettyName(aScrollAreaID);
}
};
}
/**
@ -78,7 +78,7 @@
testAccessibleTree(this.container, accTree);
this.scrollAreaNode.style.overflow = "auto";
}
};
this.finalCheck = function changeScrollbarStyles_finalCheck() {
var accTree =
@ -86,11 +86,11 @@
{ SECTION: [] } // scroll area
] };
testAccessibleTree(this.container, accTree);
}
};
this.getID = function changeScrollbarStyles_getID() {
return "change scrollbar styles " + prettyName(aScrollAreaID);
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -47,7 +47,7 @@
]
};
testAccessibleTree(getDocNode(aID), tree);
}
};
}
function rootContentRemoved(aID) {
@ -60,7 +60,7 @@
// Set up target for hide event before we invoke.
var text = getAccessible(getAccessible(getDocNode(aID)).firstChild);
this.eventSeq[0].target = text;
}
};
this.finalCheck = function rootContentRemoved_finalCheck() {
var tree = {
@ -68,7 +68,7 @@
children: [ ]
};
testAccessibleTree(getDocNode(aID), tree);
}
};
}
function rootContentInserted(aID, aTextName) {
@ -88,7 +88,7 @@
]
};
testAccessibleTree(getDocNode(aID), tree);
}
};
}
// //////////////////////////////////////////////////////////////////////////
@ -105,11 +105,11 @@
var script = docNode.createElement("script");
script.textContent = "document.open(); document.write('hello'); document.close();";
docNode.body.appendChild(script);
}
};
this.getID = function writeIFrameDoc_getID() {
return "write document";
}
};
}
/**
@ -126,7 +126,7 @@
var newHTMLNode = docNode.createElement("html");
newHTMLNode.innerHTML = `<body><p>New Wave</p></body`;
docNode.replaceChild(newHTMLNode, docNode.documentElement);
}
};
this.finalCheck = function replaceIFrameHTMLElm_finalCheck() {
var tree = {
@ -144,11 +144,11 @@
]
};
testAccessibleTree(getDocNode(aID), tree);
}
};
this.getID = function replaceIFrameHTMLElm_getID() {
return "replace HTML element";
}
};
}
/**
@ -163,11 +163,11 @@
var newTextNode = docNode.createTextNode("New Hello");
newBodyNode.appendChild(newTextNode);
docNode.documentElement.replaceChild(newBodyNode, docNode.body);
}
};
this.getID = function replaceIFrameBody_getID() {
return "replace body";
}
};
}
/**
@ -184,11 +184,11 @@
newBodyNode.appendChild(newTextNode);
newBodyNode.setAttribute("role", "button");
docNode.documentElement.replaceChild(newBodyNode, docNode.body);
}
};
this.getID = function replaceIFrameBodyOnARIARoleBody_getID() {
return "replace body on body having ARIA role";
}
};
}
/**
@ -205,11 +205,11 @@
var script = docNode.createElement("script");
script.textContent = "function closeMe() { document.write('Works?'); document.close(); } window.closeMe = closeMe; document.open();";
docNode.body.appendChild(script);
}
};
this.getID = function openIFrameDoc_getID() {
return "open document";
}
};
}
function closeIFrameDoc(aID) {
@ -218,11 +218,11 @@
this.invoke = function closeIFrameDoc_invoke() {
// Write and close document.
getDocNode(aID).write("Works?"); getDocNode(aID).close();
}
};
this.getID = function closeIFrameDoc_getID() {
return "close document";
}
};
}
/**
@ -237,11 +237,11 @@
// Remove HTML element.
var docNode = getDocNode(aID);
docNode.firstChild.remove();
}
};
this.getID = function removeHTMLFromIFrameDoc_getID() {
return "remove HTML element";
}
};
}
function insertHTMLToIFrameDoc(aID) {
@ -256,11 +256,11 @@
body.appendChild(text);
html.appendChild(body);
docNode.appendChild(html);
}
};
this.getID = function insertHTMLToIFrameDoc_getID() {
return "insert HTML element document";
}
};
}
/**
@ -275,11 +275,11 @@
// Remove body element.
var docNode = getDocNode(aID);
docNode.documentElement.removeChild(docNode.body);
}
};
this.getID = function removeBodyFromIFrameDoc_getID() {
return "remove body element";
}
};
}
function insertElmUnderDocElmWhileBodyMissed(aID) {
@ -297,7 +297,7 @@
this.docNode = getDocNode(aID);
this.inputNode = this.docNode.createElement("input");
this.docNode.documentElement.appendChild(this.inputNode);
}
};
this.finalCheck = function finalCheck() {
var tree =
@ -308,11 +308,11 @@
// Remove aftermath of this test before next test starts.
this.docNode.documentElement.removeChild(this.inputNode);
}
};
this.getID = function getID() {
return "Insert element under document element while body is missed.";
}
};
}
function insertBodyToIFrameDoc(aID) {
@ -325,11 +325,11 @@
var text = docNode.createTextNode("Yo ho ho i butylka roma!");
body.appendChild(text);
docNode.documentElement.appendChild(body);
}
};
this.getID = function insertBodyToIFrameDoc_getID() {
return "insert body element";
}
};
}
function changeSrc(aID) {
@ -341,7 +341,7 @@
this.invoke = function changeSrc_invoke() {
this.containerNode.src = "data:text/html,<html><input></html>";
}
};
this.finalCheck = function changeSrc_finalCheck() {
var tree =
@ -351,11 +351,11 @@
] }
] };
testAccessibleTree(this.containerNode, tree);
}
};
this.getID = function changeSrc_getID() {
return "change src on iframe";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -48,7 +48,7 @@
node.textContent = "text";
node.setAttribute("class", "gentext");
this.containerNode.appendChild(node);
}
};
this.finalCheck = function insertNodeHavingGenContent_finalCheck() {
var accTree =
@ -60,11 +60,11 @@
] }
] };
testAccessibleTree(this.container, accTree);
}
};
this.getID = function insertNodeHavingGenContent_getID() {
return "insert node having generated content to " + prettyName(aContainerID);
}
};
}
/**
@ -82,7 +82,7 @@
this.invoke = function addGenContent_invoke() {
this.node.setAttribute("class", "gentext");
}
};
this.finalCheck = function insertNodeHavingGenContent_finalCheck() {
var accTree =
@ -94,11 +94,11 @@
] }
] };
testAccessibleTree(this.container, accTree);
}
};
this.getID = function addGenContent_getID() {
return "add generated content to" + prettyName(aNodeID);
}
};
}
/**

Просмотреть файл

@ -35,7 +35,7 @@
var button = document.createElement("input");
button.setAttribute("type", "button");
getNode(aContainer).appendChild(button);
}
};
this.finalCheck = function prependAppend_finalCheck() {
var accTree =
@ -45,11 +45,11 @@
{ PUSHBUTTON: [ ] }
] };
testAccessibleTree(aContainer, accTree);
}
};
this.getID = function prependAppend_getID() {
return "prepends a child and appends a child";
}
};
}
function removeRemove(aContainer) {
@ -59,7 +59,7 @@
this.invoke = function removeRemove_invoke() {
getNode(aContainer).firstChild.remove();
}
};
this.finalCheck = function removeRemove_finalCheck() {
var accTree =
@ -67,11 +67,11 @@
{ PUSHBUTTON: [ ] }
] };
testAccessibleTree(aContainer, accTree);
}
};
this.getID = function removeRemove_getID() {
return "remove first and second children";
}
};
}
function insertInaccessibleAccessibleSiblings() {
@ -82,7 +82,7 @@
this.invoke = function insertInaccessibleAccessibleSiblings_invoke() {
getNode("c3").appendChild(document.createElement("span"));
getNode("c3").appendChild(document.createElement("input"));
}
};
this.finalCheck = function insertInaccessibleAccessibleSiblings_finalCheck() {
var accTree =
@ -93,11 +93,11 @@
{ ENTRY: [ ] }
] };
testAccessibleTree("c3", accTree);
}
};
this.getID = function insertInaccessibleAccessibleSiblings_getID() {
return "insert inaccessible and then accessible siblings";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -40,18 +40,18 @@
testAccessibleTree(aContainerID, tree);
getNode(aChildID).setAttribute("hidden", "true");
}
};
this.finalCheck = function setHiddenAttr_finalCheck() {
var tree =
{ SECTION: [
] };
testAccessibleTree(aContainerID, tree);
}
};
this.getID = function setHiddenAttr_getID() {
return "Set @hidden attribute on input and test accessible tree for div";
}
};
}
/**
@ -69,7 +69,7 @@
testAccessibleTree(aContainerID, tree);
getNode(aChildID).removeAttribute("hidden");
}
};
this.finalCheck = function removeHiddenAttr_finalCheck() {
var tree =
@ -78,11 +78,11 @@
] }
] };
testAccessibleTree(aContainerID, tree);
}
};
this.getID = function removeHiddenAttr_getID() {
return "Remove @hidden attribute on input and test accessible tree for div";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -40,7 +40,7 @@
areaElm.setAttribute("shape", "rect");
this.mapNode.insertBefore(areaElm, this.mapNode.firstChild);
}
};
this.finalCheck = function insertArea_finalCheck() {
var accTree =
@ -57,11 +57,11 @@
},
] };
testAccessibleTree(this.imageMap, accTree);
}
};
this.getID = function insertArea_getID() {
return "insert area element";
}
};
}
function appendArea(aImageMapID, aMapID) {
@ -86,7 +86,7 @@
areaElm.setAttribute("shape", "rect");
this.mapNode.appendChild(areaElm);
}
};
this.finalCheck = function appendArea_finalCheck() {
var accTree =
@ -108,11 +108,11 @@
}
] };
testAccessibleTree(this.imageMap, accTree);
}
};
this.getID = function appendArea_getID() {
return "append area element";
}
};
}
function removeArea(aImageMapID, aMapID) {
@ -132,7 +132,7 @@
this.invoke = function removeArea_invoke() {
this.area = this.imageMap.firstChild;
this.mapNode.removeChild(this.mapNode.firstElementChild);
}
};
this.finalCheck = function removeArea_finalCheck() {
var accTree =
@ -149,11 +149,11 @@
}
] };
testAccessibleTree(this.imageMap, accTree);
}
};
this.getID = function removeArea_getID() {
return "remove area element";
}
};
}
function removeNameOnMap(aImageMapContainerID, aImageMapID, aMapID) {
@ -171,7 +171,7 @@
this.invoke = function removeNameOnMap_invoke() {
this.mapNode.removeAttribute("name");
}
};
this.finalCheck = function removeNameOnMap_finalCheck() {
var accTree =
@ -179,11 +179,11 @@
{ GRAPHIC: [ ] }
] };
testAccessibleTree(this.container, accTree);
}
};
this.getID = function removeNameOnMap_getID() {
return "remove @name on map element";
}
};
}
function restoreNameOnMap(aImageMapContainerID, aImageMapID, aMapID) {
@ -209,7 +209,7 @@
// XXXhack: force repainting of the image (see bug 745788 for details).
waveOverImageMap(aImageMapID);
}
};
this.finalCheck = function removeNameOnMap_finalCheck() {
var accTree =
@ -220,11 +220,11 @@
] }
] };
testAccessibleTree(this.container, accTree);
}
};
this.getID = function removeNameOnMap_getID() {
return "restore @name on map element";
}
};
}
function removeMap(aImageMapContainerID, aImageMapID, aMapID) {
@ -247,7 +247,7 @@
this.invoke = function removeMap_invoke() {
this.imageMap = getAccessible(aImageMapID);
this.mapNode.remove();
}
};
this.finalCheck = function removeMap_finalCheck() {
var accTree =
@ -255,11 +255,11 @@
{ GRAPHIC: [ ] }
] };
testAccessibleTree(this.container, accTree);
}
};
this.getID = function removeMap_getID() {
return "remove map element";
}
};
}
function insertMap(aImageMapContainerID, aImageID) {
@ -285,7 +285,7 @@
map.setAttribute("name", "atoz_map");
map.setAttribute("id", "map");
var area = document.createElement("area")
var area = document.createElement("area");
area.setAttribute("href",
"http://www.bbc.co.uk/radio4/atoz/index.shtml#b");
area.setAttribute("coords", "17,0,30,14");
@ -295,7 +295,7 @@
map.appendChild(area);
this.containerNode.appendChild(map);
}
};
this.finalCheck = function insertMap_finalCheck() {
var accTree =
@ -305,11 +305,11 @@
] }
] };
testAccessibleTree(this.container, accTree);
}
};
this.getID = function insertMap_getID() {
return "insert map element";
}
};
}
function hideImageMap(aContainerID, aImageID) {
@ -329,17 +329,17 @@
this.invoke = function hideImageMap_invoke() {
this.imageMap = getAccessible(this.imageMapNode);
this.imageMapNode.style.display = "none";
}
};
this.finalCheck = function hideImageMap_finalCheck() {
var accTree =
{ SECTION: [ ] };
testAccessibleTree(this.container, accTree);
}
};
this.getID = function hideImageMap_getID() {
return "display:none image";
}
};
}
// gA11yEventDumpToConsole = true; // debug stuff

Просмотреть файл

@ -50,7 +50,7 @@
this.process = function hideProcessor_process() {
this.liNode.style.display = "none";
}
};
this.onProcessed = function hideProcessor_onProcessed() {
window.setTimeout(
@ -62,7 +62,7 @@
},
0, this.li, this.liNode, this.bullet
);
}
};
}
function showProcessor() {
@ -70,12 +70,12 @@
this.process = function showProcessor_process() {
this.liNode.style.display = "list-item";
}
};
this.onProcessed = function showProcessor_onProcessed() {
testLiAccessibleTree();
gSequence.processNext();
}
};
}
function textReplaceProcessor() {
@ -83,7 +83,7 @@
this.process = function textReplaceProcessor_process() {
this.liNode.textContent = "hey";
}
};
this.onProcessed = function textReplaceProcessor_onProcessed() {
var tree = {
@ -94,7 +94,7 @@
};
testAccessibleTree(this.liNode, tree);
SimpleTest.finish();
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -33,7 +33,7 @@
this.invoke = function addLi_invoke() {
this.listNode.appendChild(this.liNode);
}
};
this.finalCheck = function addLi_finalCheck() {
var tree = {
@ -56,11 +56,11 @@
]
};
testAccessibleTree(aID, tree);
}
};
this.getID = function addLi_getID() {
return "add li";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -35,7 +35,7 @@
this.selectNode.add(optGroup, null);
var option = document.createElement("option");
this.selectNode.add(option, null);
}
};
this.eventSeq = [
new invokerChecker(EVENT_REORDER, this.selectList)
@ -57,11 +57,11 @@
] }
] };
testAccessibleTree(this.select, tree);
}
};
this.getID = function addOptGroup_getID() {
return "test optgroup's insertion into a select";
}
};
}
function removeOptGroup(aID) {
@ -72,7 +72,7 @@
this.invoke = function removeOptGroup_invoke() {
this.option1Node = this.selectNode.firstChild.firstChild;
this.selectNode.firstChild.remove();
}
};
this.eventSeq = [
new invokerChecker(EVENT_REORDER, this.selectList)
@ -87,11 +87,11 @@
] };
testAccessibleTree(this.select, tree);
is(isAccessible(this.option1Node), false, "removed option shouldn't be accessible anymore!");
}
};
this.getID = function removeOptGroup_getID() {
return "test optgroup's removal from a select";
}
};
}
// gA11yEventDumpToConsole = true;

Просмотреть файл

@ -52,11 +52,11 @@
this.invoke = function changeAttr_invoke() {
this.node.setAttribute(aAttr, aValue);
}
};
this.getID = function changeAttr_getID() {
return "change " + aAttr + "attribute for " + aID;
}
};
}
function removeAttr(aID, aAttr) {
@ -64,11 +64,11 @@
this.invoke = function remvoeAttr_invoke() {
this.node.removeAttribute(aAttr);
}
};
this.getID = function remvoeAttr_getID() {
return "remove " + aAttr + "attribute for " + aID;
}
};
}
function changeRole(aID, aHasAccessible) {

Просмотреть файл

@ -30,7 +30,7 @@
this.selectNode.add(opt, null);
}
}
};
this.eventSeq = [
new invokerChecker(EVENT_REORDER, this.selectList)
@ -49,11 +49,11 @@
] }
] };
testAccessibleTree(this.select, tree);
}
};
this.getID = function addOptions_getID() {
return "test elements insertion into a select";
}
};
}
function removeOptions(aID) {
@ -64,7 +64,7 @@
this.invoke = function removeOptions_invoke() {
while (this.selectNode.length)
this.selectNode.remove(0);
}
};
this.eventSeq = [
new invokerChecker(EVENT_REORDER, this.selectList)
@ -76,11 +76,11 @@
{ COMBOBOX_LIST: [] }
] };
testAccessibleTree(this.select, tree);
}
};
this.getID = function removeptions_getID() {
return "test elements removal from a select";
}
};
}
/**
@ -94,7 +94,7 @@
this.invoke = function setHrefOnOption_setHref() {
getNode("s2_o").setAttribute("href", "1");
}
};
this.finalCheck = function() {
var tree =
@ -104,11 +104,11 @@
] }
] };
testAccessibleTree("s2", tree);
}
};
this.getID = function removeptions_getID() {
return "setting @href on select option";
}
};
}
function doTest() {

Просмотреть файл

@ -24,7 +24,7 @@
var caption = document.createElement("caption");
caption.textContent = "table caption";
getNode(aTableID).appendChild(caption);
}
};
this.eventSeq = [
new invokerChecker(EVENT_REORDER, aTableID)
@ -42,11 +42,11 @@
] }
] };
testAccessibleTree(aTableID, tree);
}
};
this.getID = function appendCaption_getID() {
return "append caption";
}
};
}
function doTest() {

Просмотреть файл

@ -33,7 +33,7 @@
var textLeaf = getAccessible(this.node).firstChild;
is(textLeaf.actionCount, (aIsTextLeafLinkable ? 1 : 0),
"Wrong action numbers!");
}
};
}
function setOnClickAttr(aID) {
@ -57,11 +57,11 @@
this.invoke = function setOnClickAttr_invoke() {
this.node.setAttribute("role", "link");
this.node.setAttribute("onclick", "alert(3);");
}
};
this.getID = function setOnClickAttr_getID() {
return "make " + prettyName(aID) + " linkable";
}
};
}
function removeTextData(aID, aRole) {
@ -85,7 +85,7 @@
testAccessibleTree(this.containerNode, tree);
this.textNode.data = "";
}
};
this.finalCheck = function removeTextData_finalCheck() {
var tree = {
@ -93,11 +93,11 @@
children: []
};
testAccessibleTree(this.containerNode, tree);
}
};
this.getID = function removeTextData_finalCheck() {
return "remove text data of text node inside '" + aID + "'.";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -44,7 +44,7 @@
testAccessibleTree(aContainerID, tree);
getNode(aParentID).style.visibility = "hidden";
}
};
this.finalCheck = function finalCheck() {
var tree =
@ -54,11 +54,11 @@
] }
] };
testAccessibleTree(aContainerID, tree);
}
};
this.getID = function getID() {
return "hide parent while child stays visible";
}
};
}
/**
@ -89,7 +89,7 @@
testAccessibleTree(aContainerID, tree);
getNode(aGrandParentID).style.visibility = "hidden";
}
};
this.finalCheck = function finalCheck() {
var tree =
@ -102,11 +102,11 @@
] }
] };
testAccessibleTree(aContainerID, tree);
}
};
this.getID = function getID() {
return "hide grand parent while its children stay visible";
}
};
}
/**
@ -140,7 +140,7 @@
getNode(aContainerID).style.color = "red";
getNode(aParentID).style.visibility = "hidden";
getNode(aParent2ID).style.visibility = "hidden";
}
};
this.finalCheck = function finalCheck() {
var tree =
@ -153,11 +153,11 @@
] }
] };
testAccessibleTree(aContainerID, tree);
}
};
this.getID = function getID() {
return "change container style, hide parents while their children stay visible";
}
};
}
/**
@ -182,7 +182,7 @@
getNode(aContainerID).style.color = "red";
getNode(aChildID).style.visibility = "visible";
}
};
this.finalCheck = function finalCheck() {
var tree =
@ -198,11 +198,11 @@
] }
] };
testAccessibleTree(aContainerID, tree);
}
};
this.getID = function getID() {
return "change container style, make visible child insdie the table";
}
};
}
/**
@ -233,7 +233,7 @@
testAccessibleTree(aContainerID, tree);
getNode(aSubContainerID).style.visibility = "hidden";
}
};
this.finalCheck = function finalCheck() {
var tree =
@ -243,11 +243,11 @@
] }
] };
testAccessibleTree(aContainerID, tree);
}
};
this.getID = function getID() {
return "hide subcontainer while child inside the table stays visible";
}
};
}
/**
@ -280,7 +280,7 @@
// invoke
getNode(aSubContainerID).style.visibility = "hidden";
}
};
this.finalCheck = function finalCheck() {
var tree =
@ -291,11 +291,11 @@
{ TEXT_LEAF: [] } ]} ]};
testAccessibleTree(aContainerID, tree);
}
};
this.getID = function getID() {
return "hide subcontainer while its child and child inside the nested table stays visible";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -53,7 +53,7 @@
] };
testAccessibleTree(this.containerNode, tree);
}
};
this.invoke = function setOnClickAttr_invoke() {
var tree =
@ -68,11 +68,11 @@
testAccessibleTree(this.containerNode, tree);
this.containerNode.removeChild(this.imgNode);
}
};
this.getID = function setOnClickAttr_getID() {
return "remove middle img";
}
};
}
/**
@ -114,7 +114,7 @@
testAccessibleTree(this.topNode, tree);
this.containerNode.appendChild(this.imgNode);
}
};
this.finalCheck = function insertImg_finalCheck() {
var tree =
@ -129,11 +129,11 @@
] };
testAccessibleTree(this.topNode, tree);
}
};
this.getID = function appendImg_getID() {
return "insert img into internal container";
}
};
}
// //////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -15,11 +15,11 @@ function loadXULTreeAndDoTest(aDoTestFunc, aTreeID, aTreeView) {
this.invoke = function loadXULTree_invoke() {
this.treeNode.view = aTreeView;
}
};
this.getID = function loadXULTree_getID() {
return "Load XUL tree " + prettyName(aTreeID);
}
};
}
gXULTreeLoadContext.queue = new eventQueue();
@ -27,7 +27,7 @@ function loadXULTreeAndDoTest(aDoTestFunc, aTreeID, aTreeView) {
gXULTreeLoadContext.queue.onFinish = function() {
SimpleTest.executeSoon(doTestFunc);
return DO_NOT_FINISH_TEST;
}
};
gXULTreeLoadContext.queue.invoke();
}

Просмотреть файл

@ -434,11 +434,11 @@
// Now create the actual links.
if (domainResult) {
createLink(sd, "cert_domain_link", domainResult[1])
createLink(sd, "cert_domain_link", domainResult[1]);
// Append text for anything between the two links.
sd.appendChild(document.createTextNode(desc.slice(desc.indexOf("</a>") + "</a>".length, codeResult.index)));
}
createLink(sd, "errorCode", codeResult[1])
createLink(sd, "errorCode", codeResult[1]);
// Finally, append text for anything after the last closing </a>.
sd.appendChild(document.createTextNode(desc.slice(desc.lastIndexOf("</a>") + "</a>".length)));

Просмотреть файл

@ -256,7 +256,7 @@ function migrateToDevEdition(urlParams) {
show("stage", "intro");
// load the remote frame in the background
fxAccounts.promiseAccountsSignUpURI().then(uri => {
wrapper.init(uri, urlParams)
wrapper.init(uri, urlParams);
}).catch(e => {
console.log("Failed to load signup page", e);
setErrorPage("configError");

Просмотреть файл

@ -97,7 +97,7 @@ var healthReportWrapper = {
let data = {
type,
content
}
};
let iframe = document.getElementById("remote-report");
iframe.contentWindow.postMessage(data, reportUrl);
@ -156,7 +156,7 @@ var healthReportWrapper = {
reportFailure(error) {
let details = {
errorType: error,
}
};
healthReportWrapper.injectData("error", details);
},
@ -167,6 +167,6 @@ var healthReportWrapper = {
handlePayloadFailure() {
healthReportWrapper.reportFailure(healthReportWrapper.ERROR_PAYLOAD_FAILED);
},
}
};
window.addEventListener("load", function() { healthReportWrapper.init(); });

Просмотреть файл

@ -125,7 +125,7 @@ function ensureSnippetsMapThen(aCallback) {
callback(gSnippetsMap);
}
gSnippetsMapCallbacks.length = 0;
}
};
let openRequest = indexedDB.open(DATABASE_NAME, {version: DATABASE_VERSION,
storage: DATABASE_STORAGE});
@ -142,19 +142,19 @@ function ensureSnippetsMapThen(aCallback) {
if (!db.objectStoreNames.contains(SNIPPETS_OBJECTSTORE_NAME)) {
db.createObjectStore(SNIPPETS_OBJECTSTORE_NAME);
}
}
};
openRequest.onsuccess = function(event) {
let db = event.target.result;
db.onerror = function() {
invokeCallbacks();
}
};
db.onversionchange = function(versionChangeEvent) {
versionChangeEvent.target.close();
invokeCallbacks();
}
};
let cache = new Map();
let cursorRequest;
@ -169,7 +169,7 @@ function ensureSnippetsMapThen(aCallback) {
cursorRequest.onerror = function() {
invokeCallbacks();
}
};
cursorRequest.onsuccess = function(cursorRequestEvent) {
let cursor = cursorRequestEvent.target.result;
@ -204,8 +204,8 @@ function ensureSnippetsMapThen(aCallback) {
});
setTimeout(invokeCallbacks, 0);
}
}
};
};
}
function onSearchSubmit(aEvent) {

Просмотреть файл

@ -78,7 +78,7 @@ var gXPInstallObserver = {
let pending = this.pendingInstalls.get(browser);
if (pending && pending.length)
this.showInstallConfirmation(browser, pending.shift());
}
};
// If all installs have already been cancelled in some way then just show
// the next confirmation
@ -309,7 +309,7 @@ var gXPInstallObserver = {
case "addon-install-started": {
let needsDownload = function needsDownload(aInstall) {
return aInstall.state != AddonManager.STATE_DOWNLOADED;
}
};
// If all installs have already been downloaded then there is no need to
// show the download progress
if (!installInfo.installs.some(needsDownload))

Просмотреть файл

@ -264,7 +264,7 @@ var CaptivePortalWatcher = {
return;
}
gBrowser.removeTab(tab);
}
};
Services.obs.addObserver(tabCloser, "captive-portal-login-abort");
Services.obs.addObserver(tabCloser, "captive-portal-login-success");
},

Просмотреть файл

@ -78,4 +78,4 @@ var CustomizationHandler = {
gBrowser.selectedBrowser.focus();
}
}
};

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше