summaryrefslogtreecommitdiffstats
path: root/browser/extensions/formautofill/test/mochitest/formautofill_common.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /browser/extensions/formautofill/test/mochitest/formautofill_common.js
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz
firefox-adbda400be353e676059e335c3c0aaf99e719475.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/extensions/formautofill/test/mochitest/formautofill_common.js')
-rw-r--r--browser/extensions/formautofill/test/mochitest/formautofill_common.js22
1 files changed, 0 insertions, 22 deletions
diff --git a/browser/extensions/formautofill/test/mochitest/formautofill_common.js b/browser/extensions/formautofill/test/mochitest/formautofill_common.js
index 6dbfa7c918..6cdf9ca86b 100644
--- a/browser/extensions/formautofill/test/mochitest/formautofill_common.js
+++ b/browser/extensions/formautofill/test/mochitest/formautofill_common.js
@@ -104,27 +104,6 @@ async function checkFieldHighlighted(elem, expectedValue) {
is(isHighlightApplied, expectedValue, `Checking #${elem.id} highlight style`);
}
-async function checkFieldPreview(elem, expectedValue) {
- is(
- SpecialPowers.wrap(elem).previewValue,
- expectedValue,
- `Checking #${elem.id} previewValue`
- );
- let isTextColorApplied;
- await SimpleTest.promiseWaitForCondition(function checkPreview() {
- const computedStyle = window.getComputedStyle(elem);
- const actualColor = computedStyle.getPropertyValue("color");
- if (elem.disabled) {
- isTextColorApplied = actualColor !== defaultDisabledTextColor;
- } else {
- isTextColorApplied = actualColor !== defaultTextColor;
- }
- return isTextColorApplied === !!expectedValue;
- }, `Checking #${elem.id} preview style`);
-
- is(isTextColorApplied, !!expectedValue, `Checking #${elem.id} preview style`);
-}
-
async function checkFormFieldsStyle(profile, isPreviewing = true) {
const elems = document.querySelectorAll("input, select");
@@ -143,7 +122,6 @@ async function checkFormFieldsStyle(profile, isPreviewing = true) {
(isPreviewing && fillableValue?.toString().replaceAll("*", "•")) || "";
}
await checkFieldHighlighted(elem, !!fillableValue);
- await checkFieldPreview(elem, previewValue);
}
}