зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1261715 - Avoid promise rejections in browser_rules_add-rule_05.js; r=jryans
This test simulates a context click in the rule view and selects the "add rule" item in order to add a new rule. Adding a rule triggers a ruleview-changed event, and so this test should start listening for this event before triggering the action, which it did not do. MozReview-Commit-ID: BPO8Fgwsq5M --HG-- extra : rebase_source : e975e57148850c41cfae4d9748809d1f6672aa84
This commit is contained in:
Родитель
e710d0b812
Коммит
01d7e9bf57
|
@ -59,12 +59,11 @@ function* addNewRuleFromContextMenu(inspector, view) {
|
|||
|
||||
ok(!view._contextmenu.menuitemAddRule.hidden, "Add rule is visible");
|
||||
|
||||
info("Adding the new rule");
|
||||
info("Adding the new rule and expecting a ruleview-changed event");
|
||||
let onRuleViewChanged = view.once("ruleview-changed");
|
||||
view._contextmenu.menuitemAddRule.click();
|
||||
view._contextmenu._menupopup.hidePopup();
|
||||
|
||||
info("Waiting for rule view to change");
|
||||
yield view.once("ruleview-changed");
|
||||
yield onRuleViewChanged;
|
||||
}
|
||||
|
||||
function* testNewRule(view, expected, index) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче