Bug 1580976 - Check that moz-http2.js is working before running test_trr.js r=JuniorHsu

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Valentin Gosu 2019-10-15 16:40:06 +00:00
Родитель 5df82bce2d
Коммит ca8206c9cd
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -1,5 +1,6 @@
"use strict";
const { NodeServer } = ChromeUtils.import("resource://testing-common/httpd.js");
const dns = Cc["@mozilla.org/network/dns-service;1"].getService(
Ci.nsIDNSService
);
@ -140,6 +141,17 @@ class DNSListener {
}
}
add_task(async function test0_nodeExecute() {
// This test checks that moz-http2.js running in node is working.
// This should always be the first test in this file (except for setup)
// otherwise we may encounter random failures when the http2 server is down.
equal(
await NodeServer.execute(`"hello"`),
"hello",
"Check that moz-http2.js is running"
);
});
// verify basic A record
add_task(async function test1() {
dns.clearCache(true);