summaryrefslogtreecommitdiffstats
path: root/toolkit/components/prompts/test/chromeScript.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/prompts/test/chromeScript.js')
-rw-r--r--toolkit/components/prompts/test/chromeScript.js49
1 files changed, 1 insertions, 48 deletions
diff --git a/toolkit/components/prompts/test/chromeScript.js b/toolkit/components/prompts/test/chromeScript.js
index 9a6bacc8a4..f873c5d04b 100644
--- a/toolkit/components/prompts/test/chromeScript.js
+++ b/toolkit/components/prompts/test/chromeScript.js
@@ -31,52 +31,6 @@ async function handlePromptWhenItAppears(action, modalType, isSelect) {
}
}
-function checkTabModal(prompt, browser) {
- let doc = browser.ownerDocument;
-
- let { bottom: toolboxBottom } = doc
- .getElementById("navigator-toolbox")
- .getBoundingClientRect();
-
- let { mainContainer } = prompt.ui;
-
- let { x, y } = mainContainer.getBoundingClientRect();
- ok(y > 0, "Container should have y > 0");
- // Inset by 1px since the corner point doesn't return the frame due to the
- // border-radius.
- is(
- doc.elementFromPoint(x + 1, y + 1).parentNode,
- mainContainer,
- "Check tabmodalprompt is visible"
- );
-
- info("Click to the left of the dialog over the content area");
- isnot(
- doc.elementFromPoint(x - 10, y + 50),
- browser,
- "Check clicks on the content area don't go to the browser"
- );
- is(
- doc.elementFromPoint(x - 10, y + 50),
- prompt.element,
- "Check clicks on the content area go to the prompt dialog background"
- );
-
- if (prompt.args.modalType == Ci.nsIPrompt.MODAL_TYPE_TAB) {
- ok(
- y <= toolboxBottom - 5,
- "Dialog should overlap the toolbox by at least 5px"
- );
- } else {
- ok(y >= toolboxBottom, "Dialog must not overlap with toolbox.");
- }
-
- ok(
- browser.hasAttribute("tabmodalPromptShowing"),
- "Check browser has @tabmodalPromptShowing"
- );
-}
-
async function handlePrompt(action, modalType, isSelect) {
let ui;
let browserWin = Services.wm.getMostRecentWindow("navigator:browser");
@@ -142,8 +96,7 @@ function getPromptState(ui) {
state.checkHidden = ui.checkboxContainer.hidden;
state.checkMsg = state.checkHidden ? "" : ui.checkbox.label;
state.checked = state.checkHidden ? false : ui.checkbox.checked;
- // TabModalPrompts don't have an infoIcon
- state.iconClass = ui.infoIcon ? ui.infoIcon.className : null;
+ state.iconClass = ui.infoIcon.className;
state.textValue = ui.loginTextbox.value;
state.passValue = ui.password1Textbox.value;