security/manager/ssl/tests/mochitest/mixedcontent/test_innerHtmlUnsecurePicture.html
author Mark Banner <standard8@mozilla.com>
Mon, 08 May 2017 10:29:47 +0100
changeset 357703 61f9d530898ae753cddeecc240ad1896b9b9b939
parent 357701 e1e81b129b5b389f59ccc2144573a7c7af728a2a
child 422829 1bc876a7147b79d262e27e74edd7a7cf93070c45
permissions -rw-r--r--
Bug 1362947 - Upgrade eslint-plugin-html to 2.0.3 to pick up --fix support. r=jaws MozReview-Commit-ID: 5fVG7akPnGM

<!DOCTYPE HTML>
<html>
<head>
  <title>innerHTML changes to unsecure test</title>
  <script type="text/javascript" src="/MochiKit/Base.js"></script>
  <script type="text/javascript" src="/MochiKit/DOM.js"></script>
  <script type="text/javascript" src="/MochiKit/Style.js"></script>
  <script type="text/javascript" src="/MochiKit/Signal.js"></script>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="text/javascript" src="mixedContentTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />

  <script class="testbody" type="text/javascript">
  /* import-globals-from mixedContentTest.js */
  "use strict";

  function runTest()
  {
    isSecurityState("secure");

    document.getElementById("buddy").innerHTML =
      "<img id='image1' src='http://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/moonsurface.jpg' />";

    window.setTimeout(function() {
      isSecurityState("broken", "innerHTML loading insecure changed to broken");
      finish();
    }, 500);
  }

  function afterNavigationTest()
  {
    is(document.getElementById("buddy").innerHTML, "\n", "innerHTML back to previous");
    isSecurityState("secure");
    finish();
  }

  </script>
</head>

<body id="buddy"></body></html>