mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1000716
- Intermittent race condition in markupview/test/browser_markupview_mutation_02.js. r=miker
This commit is contained in:
parent
ab7eacb8d8
commit
2e9dede6bb
@ -13,7 +13,6 @@ const DEFAULT_MAX_CHILDREN = 100;
|
|||||||
const COLLAPSE_ATTRIBUTE_LENGTH = 120;
|
const COLLAPSE_ATTRIBUTE_LENGTH = 120;
|
||||||
const COLLAPSE_DATA_URL_REGEX = /^data.+base64/;
|
const COLLAPSE_DATA_URL_REGEX = /^data.+base64/;
|
||||||
const COLLAPSE_DATA_URL_LENGTH = 60;
|
const COLLAPSE_DATA_URL_LENGTH = 60;
|
||||||
const CONTAINER_FLASHING_DURATION = 500;
|
|
||||||
const NEW_SELECTION_HIGHLIGHTER_TIMER = 1000;
|
const NEW_SELECTION_HIGHLIGHTER_TIMER = 1000;
|
||||||
|
|
||||||
const {UndoStack} = require("devtools/shared/undo");
|
const {UndoStack} = require("devtools/shared/undo");
|
||||||
@ -112,6 +111,11 @@ function MarkupView(aInspector, aFrame, aControllerWindow) {
|
|||||||
exports.MarkupView = MarkupView;
|
exports.MarkupView = MarkupView;
|
||||||
|
|
||||||
MarkupView.prototype = {
|
MarkupView.prototype = {
|
||||||
|
/**
|
||||||
|
* How long does a node flash when it mutates (in ms).
|
||||||
|
*/
|
||||||
|
CONTAINER_FLASHING_DURATION: 500,
|
||||||
|
|
||||||
_selectedContainer: null,
|
_selectedContainer: null,
|
||||||
|
|
||||||
_initTooltips: function() {
|
_initTooltips: function() {
|
||||||
@ -1578,7 +1582,7 @@ MarkupContainer.prototype = {
|
|||||||
}
|
}
|
||||||
this._flashMutationTimer = contentWin.setTimeout(() => {
|
this._flashMutationTimer = contentWin.setTimeout(() => {
|
||||||
this.flashed = false;
|
this.flashed = false;
|
||||||
}, CONTAINER_FLASHING_DURATION);
|
}, this.markup.CONTAINER_FLASHING_DURATION);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -55,6 +55,10 @@ const TEST_DATA = [{
|
|||||||
let test = asyncTest(function*() {
|
let test = asyncTest(function*() {
|
||||||
let {inspector} = yield addTab(TEST_URL).then(openInspector);
|
let {inspector} = yield addTab(TEST_URL).then(openInspector);
|
||||||
|
|
||||||
|
// Make sure mutated nodes flash for a very long time so we can more easily
|
||||||
|
// assert they do
|
||||||
|
inspector.markup.CONTAINER_FLASHING_DURATION = 1000 * 60 * 60;
|
||||||
|
|
||||||
info("Getting the <ul.list> root node to test mutations on");
|
info("Getting the <ul.list> root node to test mutations on");
|
||||||
let rootNode = getNode(".list");
|
let rootNode = getNode(".list");
|
||||||
let rootNodeFront = yield getNodeFront(".list", inspector);
|
let rootNodeFront = yield getNodeFront(".list", inspector);
|
||||||
@ -88,4 +92,9 @@ function* assertNodeFlashing(nodeFront, inspector) {
|
|||||||
ok(container, "Markup container for node found");
|
ok(container, "Markup container for node found");
|
||||||
ok(container.tagState.classList.contains("theme-bg-contrast"),
|
ok(container.tagState.classList.contains("theme-bg-contrast"),
|
||||||
"Markup container for node is flashing");
|
"Markup container for node is flashing");
|
||||||
|
|
||||||
|
// Clear the mutation flashing timeout now that we checked the node was flashing
|
||||||
|
let markup = inspector.markup;
|
||||||
|
markup._frame.contentWindow.clearTimeout(container._flashMutationTimer);
|
||||||
|
container._flashMutationTimer = null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user