2016-12-17 00:21:51 +03:00
|
|
|
window.onload = function() {
|
|
|
|
// We are the parent. Let's load the test.
|
2018-02-01 22:45:22 +03:00
|
|
|
if (parent == this || !location.search.includes("worklet_iframe")) {
|
2016-12-17 00:21:51 +03:00
|
|
|
SimpleTest.waitForExplicitFinish();
|
2016-11-06 11:53:34 +03:00
|
|
|
|
2016-12-17 00:21:51 +03:00
|
|
|
configureTest().then(() => {
|
|
|
|
var iframe = document.createElement("iframe");
|
|
|
|
iframe.src = location.href + "?worklet_iframe";
|
|
|
|
document.body.appendChild(iframe);
|
|
|
|
});
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
2016-11-06 11:53:34 +03:00
|
|
|
|
2016-12-17 00:21:51 +03:00
|
|
|
// Here we are in the iframe.
|
2016-11-06 11:53:34 +03:00
|
|
|
window.SimpleTest = parent.SimpleTest;
|
|
|
|
window.is = parent.is;
|
|
|
|
window.isnot = parent.isnot;
|
|
|
|
window.ok = parent.ok;
|
|
|
|
window.info = parent.info;
|
2016-12-17 00:21:51 +03:00
|
|
|
|
|
|
|
runTestInIframe();
|
2016-11-06 11:53:34 +03:00
|
|
|
};
|