mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
fae44f08b8
This changes the test a bit. It doesn't test BroadcastChannel's postMessage anymore, but receiving the message. I can't see how postMessage could be tested, since given the new setup, no one should have access to it anymore. This is functionally now very similar to another test I wrote recently, but I think it is fine to keep this too. Differential Revision: https://phabricator.services.mozilla.com/D109539
13 lines
282 B
HTML
13 lines
282 B
HTML
<script>
|
|
onpageshow = function(e) {
|
|
var bc2 = new BroadcastChannel("testUrl2_bfcache");
|
|
bc2.onmessage = function(event) {
|
|
if (event.data == "back") {
|
|
bc2.close();
|
|
history.back();
|
|
}
|
|
};
|
|
bc2.postMessage({type: e.type, persisted: e.persisted});
|
|
};
|
|
</script>
|