PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/parser/htmlparser/tests/mochitest/test_bug502091.html

http://github.com/zpao/v8monkey
HTML | 37 lines | 28 code | 4 blank | 5 comment | 0 complexity | d1eac875c093bfe3d16c579cc1090d1c MD5 | raw file
 1<!DOCTYPE HTML>
 2<html>
 3<!--
 4https://bugzilla.mozilla.org/show_bug.cgi?id=502091
 5
 6Adding a <meta> element by writing to innerHTML should work correctly.
 7-->
 8<head>
 9  <title>Test for Bug 502091</title>
10  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
11  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
12</head>
13<body>
14<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=502091">Mozilla Bug 502091</a>
15<p id="display"></p>
16<div id="content" style="display: none">
17
18</div>
19<div id="test">
20<script class="testbody" type="text/javascript">
21  function $(id) { return document.getElementById(id); }
22
23  var iframe=document.createElement("iframe");
24  iframe.setAttribute("id", "iframe");
25  iframe.src = "bug_502091_iframe.html";
26  iframe.onload = function () {
27    var div = $("iframe").contentDocument.getElementById("testdiv");
28    var meta = div.getElementsByTagName("meta");
29    is(meta.length, 1, "meta element not added to div");
30  };
31  $("test").appendChild(iframe);
32
33</script>
34</div>
35</body>
36</html>
37