forked from mirrors/gecko-dev
Backed out changeset 762270e639cf (bug 1676078) for browser_datetime_datepicker.js failures CLOSED TREE
This commit is contained in:
parent
9f60eec335
commit
0038aea648
3 changed files with 8 additions and 17 deletions
|
|
@ -266,8 +266,6 @@ add_task(async function test_datepicker_keyboard_open() {
|
|||
"waiting for open"
|
||||
);
|
||||
|
||||
let valueSet = helper.promisePickerValueSet();
|
||||
|
||||
// NOTE: After the click, the first input field (the month one) is focused,
|
||||
// so down arrow will change the selected month.
|
||||
//
|
||||
|
|
@ -275,13 +273,14 @@ add_task(async function test_datepicker_keyboard_open() {
|
|||
// DATE_FORMAT and other bits around do the same).
|
||||
BrowserTestUtils.synthesizeKey("VK_DOWN", {}, browser);
|
||||
|
||||
await valueSet;
|
||||
|
||||
is(
|
||||
helper.getElement(MONTH_YEAR).textContent,
|
||||
DATE_FORMAT(new Date(prevMonth)),
|
||||
"Should update date when updating months"
|
||||
);
|
||||
// It'd be good to use something else than waitForCondition for this but
|
||||
// there's no exposed event atm when the value changes from the child.
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
return (
|
||||
helper.getElement(MONTH_YEAR).textContent ==
|
||||
DATE_FORMAT(new Date(prevMonth))
|
||||
);
|
||||
}, "Should update date when updating months");
|
||||
|
||||
await helper.tearDown();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -214,13 +214,6 @@ class DateTimeTestHelper {
|
|||
await readyPromise;
|
||||
}
|
||||
|
||||
promisePickerValueSet() {
|
||||
return BrowserTestUtils.waitForEvent(
|
||||
this.frame.contentDocument,
|
||||
"PickerValueWasSet"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find an element on the picker.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -315,7 +315,6 @@ function DatePicker(context) {
|
|||
day,
|
||||
});
|
||||
this._update({ noSmoothScroll: true });
|
||||
document.dispatchEvent(new CustomEvent("PickerValueWasSet"));
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue