forked from Floorp-Projects/Floorp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge inbound to mozilla-central a=merge
- Loading branch information
Showing
91 changed files
with
1,832 additions
and
625 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
devtools/client/accessibility/test/browser_accessibility_context_menu_browser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* Any copyright is dedicated to the Public Domain. | ||
* http://creativecommons.org/publicdomain/zero/1.0/ */ | ||
|
||
"use strict"; | ||
|
||
const TEST_URI = "<h1 id=\"h1\">header</h1><p id=\"p\">paragraph</p>"; | ||
|
||
add_task(async function testNoShowAccessibilityPropertiesContextMenu() { | ||
let tab = await addTab(buildURL(TEST_URI)); | ||
let { linkedBrowser: browser } = tab; | ||
|
||
let contextMenu = document.getElementById("contentAreaContextMenu"); | ||
let awaitPopupShown = BrowserTestUtils.waitForEvent(contextMenu, "popupshown"); | ||
await BrowserTestUtils.synthesizeMouse("#h1", 0, 0, { | ||
type: "contextmenu", | ||
button: 2, | ||
centered: true, | ||
}, browser); | ||
await awaitPopupShown; | ||
|
||
let inspectA11YPropsItem = contextMenu.querySelector("#context-inspect-a11y"); | ||
ok(inspectA11YPropsItem.hidden, "Accessibility tools are not enabled."); | ||
contextMenu.hidePopup(); | ||
gBrowser.removeCurrentTab(); | ||
}); | ||
|
||
addA11YPanelTask("Test show accessibility properties context menu in browser.", | ||
TEST_URI, | ||
async function({ panel, toolbox, browser }) { | ||
let headerSelector = "#h1"; | ||
|
||
let contextMenu = document.getElementById("contentAreaContextMenu"); | ||
let awaitPopupShown = BrowserTestUtils.waitForEvent(contextMenu, "popupshown"); | ||
await BrowserTestUtils.synthesizeMouse(headerSelector, 0, 0, { | ||
type: "contextmenu", | ||
button: 2, | ||
centered: true, | ||
}, browser); | ||
await awaitPopupShown; | ||
|
||
let inspectA11YPropsItem = contextMenu.querySelector("#context-inspect-a11y"); | ||
|
||
info("Triggering 'Inspect Accessibility Properties' and waiting for " + | ||
"accessibility panel to open"); | ||
inspectA11YPropsItem.click(); | ||
contextMenu.hidePopup(); | ||
|
||
let selected = await panel.once("new-accessible-front-selected"); | ||
let expectedSelectedNode = await getNodeFront(headerSelector, | ||
toolbox.getPanel("inspector")); | ||
let expectedSelected = await panel.walker.getAccessibleFor(expectedSelectedNode); | ||
is(toolbox.getCurrentPanel(), panel, "Accessibility panel is currently selected"); | ||
is(selected, expectedSelected, "Accessible front selected correctly"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.