<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <title>Test L10n Mutations for ContentAppended before DOMContentLoaded</title>
  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
  <link rel="localization" href="crashreporter/aboutcrashes.ftl"/>
</head>
<body>
  <script type="application/javascript">
  "use strict";
  SimpleTest.waitForExplicitFinish();

  let elem = document.createElement("div");
  document.l10n.setAttributes(elem, "crash-reports-title");
  is(elem.textContent.length, 0);
  let verifyL10n = () => {
    if (elem.textContent.length) {
      window.removeEventListener("MozAfterPaint", verifyL10n);
      SimpleTest.finish();
    }
  };
  window.addEventListener("MozAfterPaint", verifyL10n);
  document.body.appendChild(elem);
  </script>
</body>
</html>
