1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/mochitest/whatwg/postMessage_closed_helper.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,26 @@ 1.4 +<!DOCTYPE html> 1.5 +<html xmlns="http://www.w3.org/1999/xhtml"> 1.6 +<head> 1.7 + <title>postMessage closed page</title> 1.8 + <script type="application/javascript"> 1.9 +function receiveMessage(evt) 1.10 +{ 1.11 + evt.source.postMessage("FAIL", "*"); 1.12 +} 1.13 + 1.14 +window.addEventListener("message", receiveMessage, false); 1.15 + 1.16 +function setup() 1.17 +{ 1.18 + var query = location.search.substring(1); 1.19 + 1.20 + if (query == "opener") 1.21 + window.opener.postMessage("message", "http://mochi.test:8888"); 1.22 +} 1.23 + 1.24 +window.addEventListener("load", setup, false); 1.25 + </script> 1.26 +</head> 1.27 +<body> 1.28 +</body> 1.29 +</html>