1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/xbl/test/test_bug542406.xhtml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,44 @@ 1.4 +<html xmlns="http://www.w3.org/1999/xhtml"> 1.5 +<!-- 1.6 +https://bugzilla.mozilla.org/show_bug.cgi?id=542406 1.7 +--> 1.8 +<head> 1.9 + <bindings xmlns="http://www.mozilla.org/xbl"> 1.10 + <binding id="foo"> 1.11 + <content><children/></content> 1.12 + <implementation> 1.13 + <field name="one" readonly="true">1</field> 1.14 + <field name="three">3</field> 1.15 + </implementation> 1.16 + </binding> 1.17 + </bindings> 1.18 + <title>Test for Bug 542406</title> 1.19 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.20 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.21 +</head> 1.22 +<body> 1.23 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=542406">Mozilla Bug 542406</a> 1.24 +<p id="display" style="-moz-binding: url(#foo)"></p> 1.25 +<div id="content" style="display: none"> 1.26 + 1.27 +</div> 1.28 +<pre id="test"> 1.29 +<script type="application/javascript"> 1.30 +<![CDATA[ 1.31 + 1.32 +/** Test for Bug 542406 **/ 1.33 +SimpleTest.waitForExplicitFinish(); 1.34 +addLoadEvent(function() { 1.35 + is($("display").one, 1, "Field one not installed?"); 1.36 + $("display").one = 2; 1.37 + is($("display").one, 1, "Field one not readonly"); 1.38 + is($("display").three, 3, "Field three not installed?"); 1.39 + $("display").three = 4; 1.40 + is($("display").three, 4, "Field three readonly?"); 1.41 + SimpleTest.finish(); 1.42 +}); 1.43 +]]> 1.44 +</script> 1.45 +</pre> 1.46 +</body> 1.47 +</html>