1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/xbl/test/test_bug401907.xhtml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,58 @@ 1.4 +<?xml version="1.0"?> 1.5 +<html xmlns="http://www.w3.org/1999/xhtml"> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=401907 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 401907</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 + <bindings xmlns="http://www.mozilla.org/xbl"> 1.14 + <binding id="binding"> 1.15 + <implementation> 1.16 + <constructor> 1.17 + var win = XPCNativeWrapper.unwrap(window); 1.18 + win.ok(true, "First binding with ID 'binding' should be used!"); 1.19 + win.testRun = true; 1.20 + if (win.needsFinish) { 1.21 + win.SimpleTest.finish(); 1.22 + } 1.23 + </constructor> 1.24 + </implementation> 1.25 + </binding> 1.26 + <binding id="binding"> 1.27 + <implementation> 1.28 + <constructor> 1.29 + var win = XPCNativeWrapper.unwrap(window); 1.30 + win.ok(false, "First binding with ID 'binding' should be used!"); 1.31 + win.testRun = true; 1.32 + if (win.needsFinish) { 1.33 + win.SimpleTest.finish(); 1.34 + } 1.35 + </constructor> 1.36 + </implementation> 1.37 + </binding> 1.38 + </bindings> 1.39 +</head> 1.40 +<body> 1.41 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=401907">Mozilla Bug 401907</a> 1.42 +<p id="display"></p> 1.43 +<div id="content"> 1.44 + <div style="-moz-binding: url(#binding)">Bound element</div> 1.45 +</div> 1.46 +<pre id="test"> 1.47 +<script class="testbody" type="text/javascript"> 1.48 +<![CDATA[ 1.49 + 1.50 +/** Test for Bug 401907 **/ 1.51 +if (!window.testRun) { 1.52 + window.needsFinish = true; 1.53 + SimpleTest.waitForExplicitFinish(); 1.54 +} 1.55 + 1.56 +]]> 1.57 +</script> 1.58 +</pre> 1.59 +</body> 1.60 +</html> 1.61 +