Bug 1379515 - Propagate testharness functions only if we use testharness.js. r=birtles

We are going to use SimpleTest.js in the sub window.

MozReview-Commit-ID: HAAMnY7xDNn

--HG--
extra : rebase_source : 3600376a992abf5e1e55baba99bff1a656afdaa6
This commit is contained in:
Hiroyuki Ikezoe 2017-10-30 09:49:29 +09:00
parent 886e45f39e
commit ddb1e94651

View File

@ -274,7 +274,9 @@ if (opener) {
"assert_class_string", "assert_throws",
"assert_unreached", "assert_regexp_match",
"promise_test", "test"]) {
window[funcName] = opener[funcName].bind(opener);
if (opener[funcName]) {
window[funcName] = opener[funcName].bind(opener);
}
}
window.EventWatcher = opener.EventWatcher;