gecko-dev/toolkit/components/extensions/test/mochitest/file_script_good.js
Shane Caraveo 43b464a409 Bug 1455405 fix intermittent by using real events, r=rpl
This test was testing that files are loaded/executed/etc in the page, but
what we really care about is that the webrequest api works.  Other tests
are responsible for stuff like css and js actually work.  The patch does
maintain (fixed) the js test, but removes the css test for lack of a good
way to properly wait for css to apply.

MozReview-Commit-ID: B2uByaxNeK2

--HG--
extra : rebase_source : 6779116f9f1a4a7ce24cd32c3648d1027343db93
2018-07-16 09:08:30 -03:00

12 lines
282 B
JavaScript

"use strict";
window.success = window.success ? window.success + 1 : 1;
{
let scripts = document.getElementsByTagName("script");
let url = new URL(scripts[scripts.length - 1].src);
let flag = url.searchParams.get("q");
if (flag) {
window.postMessage(flag, "*");
}
}