mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-15 04:21:02 +00:00
Bug 827990 - inspector tests use DOM MutationObserver API incorrectly; r=jwalker f=nfroyd
This commit is contained in:
parent
3e5154de16
commit
165306d0b2
@ -276,7 +276,12 @@ function test() {
|
|||||||
is(inspector.highlighter.nodeInfo.classesBox.textContent, "",
|
is(inspector.highlighter.nodeInfo.classesBox.textContent, "",
|
||||||
"No classes in the infobar before edit.");
|
"No classes in the infobar before edit.");
|
||||||
},
|
},
|
||||||
execute: function() {
|
execute: function(after) {
|
||||||
|
inspector.once("markupmutation", function() {
|
||||||
|
// needed because we need to make sure the infobar is updated
|
||||||
|
// not just the markupview (which happens in this event loop)
|
||||||
|
executeSoon(after);
|
||||||
|
});
|
||||||
let editor = markup.getContainer(doc.querySelector("#node18")).editor;
|
let editor = markup.getContainer(doc.querySelector("#node18")).editor;
|
||||||
let attr = editor.attrs["id"].querySelector(".editable");
|
let attr = editor.attrs["id"].querySelector(".editable");
|
||||||
editField(attr, attr.textContent + ' class="newclass" style="color:green"');
|
editField(attr, attr.textContent + ' class="newclass" style="color:green"');
|
||||||
@ -310,7 +315,8 @@ function test() {
|
|||||||
is(doc.querySelector("#retag-me-2").parentNode, node,
|
is(doc.querySelector("#retag-me-2").parentNode, node,
|
||||||
"retag-me-2 should be a child of the old element.");
|
"retag-me-2 should be a child of the old element.");
|
||||||
},
|
},
|
||||||
execute: function() {
|
execute: function(after) {
|
||||||
|
inspector.once("markupmutation", after);
|
||||||
let node = doc.querySelector("#retag-me");
|
let node = doc.querySelector("#retag-me");
|
||||||
let editor = markup.getContainer(node).editor;
|
let editor = markup.getContainer(node).editor;
|
||||||
let field = editor.tag;
|
let field = editor.tag;
|
||||||
@ -367,9 +373,10 @@ function test() {
|
|||||||
|
|
||||||
inspector.selection.once("new-node", function BIMET_testAsyncSetupNewNode() {
|
inspector.selection.once("new-node", function BIMET_testAsyncSetupNewNode() {
|
||||||
test.before();
|
test.before();
|
||||||
test.execute();
|
test.execute(function() {
|
||||||
test.after();
|
test.after();
|
||||||
undoRedo(test, callback);
|
undoRedo(test, callback);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
executeSoon(function BIMET_setNode2() {
|
executeSoon(function BIMET_setNode2() {
|
||||||
test.setup();
|
test.setup();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user