author David Major <>
Wed, 20 Dec 2017 09:07:46 -0500
changeset 448763 e9cfe039a796e2963a6d3e7d2a161b02cdbadcac
parent 417092 38db3cf25d6954a42feea4e4bec82c077e9181dd
child 528458 ba6f655fd68963530c866d0d4a48c3db3d307777
permissions -rw-r--r--
Bug 1425906: Rename LINK to LINKER throughout the build system. r=glandium Windows linkers give special meaning to getenv("LINK"), which makes `export LINK=...` in mozconfigs do unexpected things.

  <title>Test for Bug 379959</title>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<body onload="runTest();">
  <a target="_blank" href="">Mozilla Bug 379959</a>
  <p id="display">
    Note: In order to re-run this test correctly you need to shift-reload
    rather than simply reload. If you just reload we will restore the
    previous url in the iframe which will result in an extra unexpected
  <div id="content" style="display: none"></div>
  <iframe id="dataFrame"></iframe>
  <iframe id="originFrame"></iframe>

  <pre id="test">
    <script class="testbody" type="application/javascript">


var seenData = false;
var seenSameOrigin = false;
var seenCrossOrign = false;

function receiveMessage(e) {
  is(e.origin, "http://mochi.test:8888", "wrong sender!");

  if ( === "dataIsAllowed") {
    is(, 1, "data-url load should have succeeded");
    seenData = true;
  else if ( === "sameOriginIsAllowed") {
    is(, 1, "same site load should have succeeded");
    seenSameOrigin = true;
  else if ( === "crossOriginIsBlocked") {
    is(, 0, "cross site load should have failed");
    seenCrossOrign = true;
  else {
    ok (false, "unrecognized test");

  if (seenData && seenSameOrigin && seenCrossOrign) {
    window.removeEventListener("message", receiveMessage);

window.addEventListener("message", receiveMessage);

function runTest() {
  // make sure data: is allowed
  document.getElementById('dataFrame').src = "file_bug379959_data.html";
  // make sure same-origin is allowed but cross site is blocked
  document.getElementById('originFrame').src = "file_bug379959_cross.html";