mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1024668 - Wait for initial payload event in healthreport_testRemoteCommands.html. r=wchen
This commit is contained in:
parent
783094e166
commit
441a41885e
@ -5,8 +5,19 @@
|
||||
<script>
|
||||
|
||||
function init() {
|
||||
window.addEventListener("message", function process(e) {doTest(e)}, false);
|
||||
window.addEventListener("message", function process(e) {
|
||||
// The init function of abouthealth.js schedules an initial payload event,
|
||||
// which will be sent after the payload data has been collected. This extra
|
||||
// event can cause unexpected successes/failures in this test, so we wait
|
||||
// for the extra event to arrive here before progressing with the actual
|
||||
// test.
|
||||
if (e.data.type == "payload") {
|
||||
window.removeEventListener("message", process, false);
|
||||
|
||||
window.addEventListener("message", doTest, false);
|
||||
doTest();
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
|
||||
function checkSubmissionValue(payload, expectedValue) {
|
||||
|
Loading…
Reference in New Issue
Block a user