diff options
Diffstat (limited to 'dom/base/test/file_js_cache_save_after_load.js')
-rw-r--r-- | dom/base/test/file_js_cache_save_after_load.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dom/base/test/file_js_cache_save_after_load.js b/dom/base/test/file_js_cache_save_after_load.js new file mode 100644 index 0000000000..7f5a20b524 --- /dev/null +++ b/dom/base/test/file_js_cache_save_after_load.js @@ -0,0 +1,15 @@ +function send_ping() { + window.dispatchEvent(new Event("ping")); +} +send_ping(); // ping (=1) + +window.addEventListener("load", function () { + send_ping(); // ping (=2) + + // Append a script which should call |foo|, before the encoding of this script + // bytecode. + var script = document.createElement("script"); + script.type = "text/javascript"; + script.innerText = "send_ping();"; // ping (=3) + document.head.appendChild(script); +}); |