зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1400528 - make test_bug574663.html wait until the 'blank' attribute has actually been removed, r=mconley.
This commit is contained in:
Родитель
1aef116268
Коммит
bcf7d1dd27
|
@ -105,12 +105,20 @@ function runTest() {
|
|||
// browser to 0 using the 'blank' attribute.
|
||||
// Until the blank attribute is removed, we can't send scroll events.
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SpecialPowers.loadChromeScript(_ => {
|
||||
let chromeScript = SpecialPowers.loadChromeScript(_ => {
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Services.wm.getMostRecentWindow("navigator:browser")
|
||||
.gBrowser.selectedBrowser.removeAttribute("blank");
|
||||
let win = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
win.requestAnimationFrame(() => {
|
||||
win.gBrowser.selectedBrowser.removeAttribute("blank");
|
||||
win.requestAnimationFrame(() => {
|
||||
sendAsyncMessage("blank-attribute-removed");
|
||||
});
|
||||
});
|
||||
});
|
||||
chromeScript.promiseOneMessage("blank-attribute-removed").then(() => {
|
||||
chromeScript.destroy();
|
||||
waitForPaint(win, winUtils, callback);
|
||||
});
|
||||
waitForPaint(win, winUtils, callback);
|
||||
}, win);
|
||||
};
|
||||
|
||||
|
|
|
@ -52,12 +52,20 @@
|
|||
// browser to 0 using the 'blank' attribute.
|
||||
// Until the blank attribute is removed, we can't send scroll events.
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SpecialPowers.loadChromeScript(_ => {
|
||||
let chromeScript = SpecialPowers.loadChromeScript(_ => {
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Services.wm.getMostRecentWindow("navigator:browser")
|
||||
.gBrowser.selectedBrowser.removeAttribute("blank");
|
||||
let win = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
win.requestAnimationFrame(() => {
|
||||
win.gBrowser.selectedBrowser.removeAttribute("blank");
|
||||
win.requestAnimationFrame(() => {
|
||||
sendAsyncMessage("blank-attribute-removed");
|
||||
});
|
||||
});
|
||||
});
|
||||
chromeScript.promiseOneMessage("blank-attribute-removed").then(() => {
|
||||
chromeScript.destroy();
|
||||
runTests();
|
||||
});
|
||||
runTests();
|
||||
}, window);
|
||||
|
||||
SimpleTest.requestFlakyTimeout("untriaged");
|
||||
|
|
Загрузка…
Ссылка в новой задаче