bug 1494573 - fix tresize flakiness by not having it load resources provided by the tresize add-on r=jmaher

tresize-test.html attempts to load
"resource://talos-powers/TalosPowersContent.js", but this might not be available
yet if the tresize add-on hasn't loaded. This patch changes the location of this
resource to a relative path, which should always be available. Additionally,
this patch awaits on TalosPowers.loadPromise before using talos APIs.

Differential Revision: https://phabricator.services.mozilla.com/D7312

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dana Keeler 2018-10-01 18:00:23 +00:00
parent b249c1b717
commit 0ffb516d02

View File

@ -5,7 +5,7 @@
<head>
<script language="Javascript" type="text/javascript" src="../../../../scripts/Profiler.js"></script>
<script language="Javascript" type="text/javascript" src="../../../../scripts/MozillaFileLogger.js"></script>
<script language="Javascript" type="text/javascript" src="resource://talos-powers/TalosPowersContent.js"></script>
<script language="Javascript" type="text/javascript" src="../../../../talos-powers/content/TalosPowersContent.js"></script>
<script language="javascript" type="text/javascript">
function runTest() {
@ -23,7 +23,8 @@ function logResults(data) {
});
window.setTimeout(function() {
window.setTimeout(async function() {
await TalosPowers.loadPromise;
TalosPowersContent.goQuitApplication();
}, 0);
} else {