mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 1239208 - Fix intermittent browser_rules_edit-property-computed.js by waiting for the correct ruleview-changed event. r=pbro
The preview also causes a ruleview-changed event to be emitted. If the frame script happened to detect the change fast enough, the test would continue to commit the value and start to wait for a ruleview-changed event. If the event triggered by the preview had not been emitted, the test would continue immediately once the event triggered by the preview was received but before the value was actually committed and reflected in the computed rule list. The fix is to wait for the ruleview-changed triggered by the preview before committing the change to avoid mixing these two events.
This commit is contained in:
parent
262912967a
commit
e709251ef2
@ -36,6 +36,7 @@ function* editAndCheck(view) {
|
||||
|
||||
let onPropertyChange = waitForComputedStyleProperty("#testid", null,
|
||||
"padding-top", newPaddingValue);
|
||||
let onRefreshAfterPreview = once(view, "ruleview-changed");
|
||||
|
||||
info("Entering a new value");
|
||||
EventUtils.sendString(newPaddingValue, view.styleWindow);
|
||||
@ -44,6 +45,9 @@ function* editAndCheck(view) {
|
||||
"changes to document");
|
||||
yield onPropertyChange;
|
||||
|
||||
info("Waiting for ruleview-refreshed after previewValue was applied.");
|
||||
yield onRefreshAfterPreview;
|
||||
|
||||
let onBlur = once(editor.input, "blur");
|
||||
|
||||
info("Entering the commit key and finishing edit");
|
||||
|
Loading…
Reference in New Issue
Block a user