diff --git a/accessible/tests/browser/bounds/browser_test_resolution.js b/accessible/tests/browser/bounds/browser_test_resolution.js index 0833ba08f3a0..2da43593324a 100644 --- a/accessible/tests/browser/bounds/browser_test_resolution.js +++ b/accessible/tests/browser/bounds/browser_test_resolution.js @@ -17,7 +17,7 @@ async function testScaledBounds(browser, accDoc, scale, id, type = "object") { getRangeExtents(acc, 0, -1, COORDTYPE_SCREEN_RELATIVE) : getBounds(acc); await ContentTask.spawn(browser, scale, _scale => { - setResolution(document, _scale); + setResolution(content.document, _scale); }); let [scaledX, scaledY, scaledWidth, scaledHeight] = type == "text" ? @@ -30,7 +30,7 @@ async function testScaledBounds(browser, accDoc, scale, id, type = "object") { isWithin(scaledY - docY, (y - docY) * scale, 2, "Wrong scaled y of " + name); await ContentTask.spawn(browser, {}, () => { - setResolution(document, 1.0); + setResolution(content.document, 1.0); }); } diff --git a/accessible/tests/browser/bounds/browser_test_zoom.js b/accessible/tests/browser/bounds/browser_test_zoom.js index 89df1ac75bc2..0bf2c558a242 100644 --- a/accessible/tests/browser/bounds/browser_test_zoom.js +++ b/accessible/tests/browser/bounds/browser_test_zoom.js @@ -47,7 +47,7 @@ async function runTests(browser, accDoc) { await testContentBounds(browser, area); await ContentTask.spawn(browser, {}, () => { - zoomDocument(document, 2.0); + zoomDocument(content.document, 2.0); }); await testContentBounds(browser, p1); diff --git a/accessible/tests/browser/bounds/browser_test_zoom_text.js b/accessible/tests/browser/bounds/browser_test_zoom_text.js index f5b121f6aecd..e8da8b639304 100644 --- a/accessible/tests/browser/bounds/browser_test_zoom_text.js +++ b/accessible/tests/browser/bounds/browser_test_zoom_text.js @@ -36,13 +36,13 @@ async function runTests(browser, accDoc) { await testEmptyInputNode("i1"); await ContentTask.spawn(browser, {}, () => { - zoomDocument(document, 2.0); + zoomDocument(content.document, 2.0); }); await testTextNode("p1"); await ContentTask.spawn(browser, {}, () => { - zoomDocument(document, 1.0); + zoomDocument(content.document, 1.0); }); } diff --git a/accessible/tests/browser/browser_shutdown_remote_own_reference.js b/accessible/tests/browser/browser_shutdown_remote_own_reference.js index 8b9cd8d29d0d..322f6ffc63a7 100644 --- a/accessible/tests/browser/browser_shutdown_remote_own_reference.js +++ b/accessible/tests/browser/browser_shutdown_remote_own_reference.js @@ -40,7 +40,7 @@ add_task(async function() { contentConsumersChanged = ContentTask.spawn(browser, {}, a11yConsumersChangedPromise); // Add a new reference to the a11y service inside the content process. - loadFrameScripts(browser, `let accService = Components.classes[ + loadFrameScripts(browser, `var accService = Components.classes[ '@mozilla.org/accessibilityService;1'].getService( Components.interfaces.nsIAccessibilityService);`); await contentConsumersChanged.then(data => Assert.deepEqual(data, { diff --git a/accessible/tests/browser/e10s/browser_caching_name.js b/accessible/tests/browser/e10s/browser_caching_name.js index 612a2d55e610..f41022d19151 100644 --- a/accessible/tests/browser/e10s/browser_caching_name.js +++ b/accessible/tests/browser/e10s/browser_caching_name.js @@ -334,7 +334,7 @@ async function testAttrRule(browser, target, rule, expected) { let [event] = await contentSpawnMutation(browser, { expected: [recreated ? [EVENT_REORDER, parent] : [EVENT_TEXT_INSERTED, id]] }, ([contentId, contentAttr]) => - document.getElementById(contentId).removeAttribute(contentAttr), [id, attr]); + content.document.getElementById(contentId).removeAttribute(contentAttr), [id, attr]); // Update accessible just in case it is now defunct. target.acc = findAccessibleChildByID(event.accessible, id); @@ -362,7 +362,7 @@ async function testElmRule(browser, target, rule, expected) { testName(acc, expected); let [event] = await contentSpawnMutation(browser, { expected: [[EVENT_REORDER, isSibling ? parent : id]] - }, contentElm => document.querySelector(`${contentElm}`).remove(), elm); + }, contentElm => content.document.querySelector(`${contentElm}`).remove(), elm); // Update accessible just in case it is now defunct. target.acc = findAccessibleChildByID(event.accessible, id); @@ -387,7 +387,7 @@ async function testSubtreeRule(browser, target, rule, expected) { let [event] = await contentSpawnMutation(browser, { expected: [[EVENT_REORDER, id]] }, contentId => { - let elm = document.getElementById(contentId); + let elm = content.document.getElementById(contentId); while (elm.firstChild) { elm.firstChild.remove(); } diff --git a/accessible/tests/browser/e10s/browser_events_vcchange.js b/accessible/tests/browser/e10s/browser_events_vcchange.js index b8d49e7eb17b..d6f530d5ba48 100644 --- a/accessible/tests/browser/e10s/browser_events_vcchange.js +++ b/accessible/tests/browser/e10s/browser_events_vcchange.js @@ -10,7 +10,7 @@ addAccessibleTask(` async function(browser, accDoc) { let onVCChanged = waitForEvent(EVENT_VIRTUALCURSOR_CHANGED, accDoc); await ContentTask.spawn(browser, null, () => { - let vc = getAccessible(document, nsIAccessibleDocument).virtualCursor; + let vc = getAccessible(content.document, Ci.nsIAccessibleDocument).virtualCursor; vc.position = getAccessible("p1"); }); @@ -23,8 +23,8 @@ addAccessibleTask(` onVCChanged = waitForEvent(EVENT_VIRTUALCURSOR_CHANGED, accDoc); await ContentTask.spawn(browser, null, () => { - let vc = getAccessible(document, nsIAccessibleDocument).virtualCursor; - vc.moveNextByText(nsIAccessiblePivot.CHAR_BOUNDARY); + let vc = getAccessible(content.document, Ci.nsIAccessibleDocument).virtualCursor; + vc.moveNextByText(Ci.nsIAccessiblePivot.CHAR_BOUNDARY); }); vccEvent = (await onVCChanged).QueryInterface( nsIAccessibleVirtualCursorChangeEvent); @@ -35,7 +35,7 @@ addAccessibleTask(` onVCChanged = waitForEvent(EVENT_VIRTUALCURSOR_CHANGED, accDoc); await ContentTask.spawn(browser, null, () => { - let vc = getAccessible(document, nsIAccessibleDocument).virtualCursor; + let vc = getAccessible(content.document, Ci.nsIAccessibleDocument).virtualCursor; vc.position = getAccessible("input1"); }); vccEvent = (await onVCChanged).QueryInterface( diff --git a/accessible/tests/browser/scroll/browser_test_zoom_text.js b/accessible/tests/browser/scroll/browser_test_zoom_text.js index 248f42b10196..53e847461f53 100644 --- a/accessible/tests/browser/scroll/browser_test_zoom_text.js +++ b/accessible/tests/browser/scroll/browser_test_zoom_text.js @@ -21,7 +21,7 @@ async function runTests(browser, accDoc) { testTextPos(paragraph, offset, [x, docY], COORDTYPE_SCREEN_RELATIVE); await ContentTask.spawn(browser, {}, () => { - zoomDocument(document, 2.0); + zoomDocument(content.document, 2.0); }); paragraph = findAccessibleChildByID(accDoc, "paragraph2", [nsIAccessibleText]); diff --git a/accessible/tests/browser/tree/browser_aria_owns.js b/accessible/tests/browser/tree/browser_aria_owns.js index 79b508b0f857..f8aa66bdd76b 100644 --- a/accessible/tests/browser/tree/browser_aria_owns.js +++ b/accessible/tests/browser/tree/browser_aria_owns.js @@ -16,7 +16,7 @@ addAccessibleTask(`