Bug 1171482 - wait for 2 distinct mutations in markup test;r=pbro draft
authorJulian Descottes <jdescottes@mozilla.com>
Wed, 18 Oct 2017 13:07:45 +0200
changeset 684877 de0bf26aff7c8c5ea70efe0d11e9afa963218717
parent 684876 d5633baf56d6afefbb2a0d7cd631a8c7cb5b898b
child 684878 80f762dd619763fb00fae8afcef652571e64d791
child 684896 2b0308a141c1f5d0a6b0e8889c0968a146274308
push id85744
push userjdescottes@mozilla.com
push dateMon, 23 Oct 2017 17:40:20 +0000
reviewerspbro
bugs1171482
milestone58.0a1
Bug 1171482 - wait for 2 distinct mutations in markup test;r=pbro MozReview-Commit-ID: Jn0dEr4qe6U
devtools/client/inspector/markup/test/browser_markup_tag_edit_08.js
--- a/devtools/client/inspector/markup/test/browser_markup_tag_edit_08.js
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_08.js
@@ -21,20 +21,23 @@ add_task(function* () {
   yield testModifyInlineStyleWithQuotes(inspector, testActor);
   yield testEditingAttributeWithMixedQuotes(inspector, testActor);
 });
 
 function* testCollapsedLongAttribute(inspector, testActor) {
   info("Try to modify the collapsed long attribute, making sure it expands.");
 
   info("Adding test attributes to the node");
-  let onMutated = inspector.once("markupmutation");
+  let onMutation = inspector.once("markupmutation");
   yield testActor.setAttribute("#node24", "class", "");
+  yield onMutation;
+
+  onMutation = inspector.once("markupmutation");
   yield testActor.setAttribute("#node24", "data-long", LONG_ATTRIBUTE);
-  yield onMutated;
+  yield onMutation;
 
   yield assertAttributes("#node24", {
     id: "node24",
     "class": "",
     "data-long": LONG_ATTRIBUTE
   }, testActor);
 
   let {editor} = yield focusNode("#node24", inspector);