1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/test/test_bug392511.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,53 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=392511 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 392511</title> 1.11 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.13 +</head> 1.14 +<body> 1.15 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=392511">Mozilla Bug 392511</a> 1.16 +<p id="display"></p> 1.17 +<div id="content" style="display: none"> 1.18 + <div id="t1"><span onclick=""&"></span></div> 1.19 + <div id="t2"><span foo=""&"></span></div> 1.20 + <div id="t3"><span onclick=''&'></span></div> 1.21 + <div id="t4"><span foo=''&'></span></div> 1.22 + <div id="t5"><span onclick='"'&'></span></div> 1.23 + <div id="t6"><span foo='"'&'></span></div> 1.24 + <div id="t7"><span onclick="'"&"></span></div> 1.25 + <div id="t8"><span foo="'"&"></span></div> 1.26 +</div> 1.27 +<pre id="test"> 1.28 +<script class="testbody" type="text/javascript"> 1.29 + 1.30 +/** Test for Bug 392511 **/ 1.31 + 1.32 +var results = [ 1.33 + "\""&\"", 1.34 + "\""&\"", 1.35 + "\"'&\"", 1.36 + "\"'&\"", 1.37 + "\""'&\"", 1.38 + "\""'&\"", 1.39 + "\"'"&\"", 1.40 + "\"'"&\"" 1.41 +]; 1.42 + 1.43 +for (var i = 1; i <= 8; ++i) { 1.44 + var id = "t" + i; 1.45 + var str = $(id).innerHTML; 1.46 + var expect = "<span "; 1.47 + expect += (i % 2) ? "onclick" : "foo"; 1.48 + expect += "=" + results[i-1] + "></span>"; 1.49 + is (str, expect, "Wrong string for test " + id); 1.50 +} 1.51 + 1.52 +</script> 1.53 +</pre> 1.54 +</body> 1.55 +</html> 1.56 +