1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/parser/htmlparser/tests/mochitest/test_bug502091.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,37 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=502091 1.8 + 1.9 +Adding a <meta> element by writing to innerHTML should work correctly. 1.10 +--> 1.11 +<head> 1.12 + <title>Test for Bug 502091</title> 1.13 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.14 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.15 +</head> 1.16 +<body> 1.17 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=502091">Mozilla Bug 502091</a> 1.18 +<p id="display"></p> 1.19 +<div id="content" style="display: none"> 1.20 + 1.21 +</div> 1.22 +<div id="test"> 1.23 +<script class="testbody" type="text/javascript"> 1.24 + function $(id) { return document.getElementById(id); } 1.25 + 1.26 + var iframe=document.createElement("iframe"); 1.27 + iframe.setAttribute("id", "iframe"); 1.28 + iframe.src = "bug_502091_iframe.html"; 1.29 + iframe.onload = function () { 1.30 + var div = $("iframe").contentDocument.getElementById("testdiv"); 1.31 + var meta = div.getElementsByTagName("meta"); 1.32 + is(meta.length, 1, "meta element not added to div"); 1.33 + }; 1.34 + $("test").appendChild(iframe); 1.35 + 1.36 +</script> 1.37 +</div> 1.38 +</body> 1.39 +</html> 1.40 +