mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 20:01:50 +00:00
Bug 1860191 part 1: Add some logging to test_color_scheme_browser.xhtml. r=emilio
This is to help orient ourselves when reviewing logs when this test intermittently times out. Differential Revision: https://phabricator.services.mozilla.com/D191500
This commit is contained in:
parent
df82eee916
commit
c2d9bf74e4
@ -24,12 +24,16 @@
|
||||
<xul:browser type="content" src="about:blank" class="nonremote" />
|
||||
</div>
|
||||
<script><![CDATA[
|
||||
SimpleTest.requestCompleteLog(); // to help diagnose intermittent bug 1787008
|
||||
|
||||
// FIXME: This shouldn't be needed if remote browsers would block the load event.
|
||||
add_task(async function ensureBrowsersLoaded() {
|
||||
info("Entering ensureBrowsersLoaded callback");
|
||||
const triggeringPrincipal = document.nodePrincipal;
|
||||
for (let b of document.querySelectorAll("browser[remote=true]")) {
|
||||
let listener;
|
||||
let loaded = new Promise(resolve => {
|
||||
info("Entering 'loaded' callback; about to add progress listener");
|
||||
listener = {
|
||||
onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
|
||||
info(`Got state change for ${b.parentNode.id}: ${aStateFlags}, ${aStatus}`);
|
||||
@ -48,6 +52,7 @@
|
||||
};
|
||||
b.addProgressListener(listener);
|
||||
});
|
||||
info(`Calling b.loadURI for ${b.parentNode.id}`);
|
||||
b.loadURI(null /*blank*/, { triggeringPrincipal });
|
||||
await loaded;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user