Bustage: pushing missing files. r+a=bustage

This commit is contained in:
Mounir Lamouri 2010-09-14 02:43:39 +02:00
parent b6ae0cb58a
commit e4398b9fb0
3 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,39 @@
<!DOCTYPE HTML>
<html>
<head>
<style>
#b {
-moz-binding: url("file_bug591198_xbl.xml#xbltest");
}
span {
white-space: nowrap;
}
</style>
<script>
function sendResults() {
var res = {
widths: []
};
ps = document.getElementsByTagName('span');
for (var i = 0; i < ps.length; i++) {
res.widths.push(ps[i].offsetWidth);
}
try {
res.anonChildCount =
document.getAnonymousNodes(document.getElementById('b')).length;
}
catch (ex) {}
parent.postMessage(JSON.stringify(res), "*");
}
</script>
</head>
<body onload="sendResults();">
<div><span id=b>long long text here</span></div>
<div><span>long long text here</span></div>
<div><span>PASS</span></div>
</body>
</html>

View File

@ -0,0 +1,5 @@
<?xml version="1.0"?>
<bindings id="xbltestBindings" xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml">
<binding id="xbltest"><content>PASS<html:b style="display:none"><children/></html:b></content></binding>
</bindings>

View File

@ -0,0 +1,47 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=591198
-->
<head>
<title>Test for Bug 591198</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
</head>
<body onload="gen.next();">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=591198">Mozilla Bug 591198</a>
<iframe id=iframe></iframe>
<pre id="test">
<script class="testbody" type="text/javascript;version=1.8">
SimpleTest.waitForExplicitFinish();
gen = runTest();
function runTest() {
let iframe = $('iframe');
window.addEventListener("message", function(e) {
gen.send(JSON.parse(e.data));
}, false);
iframe.src = "file_bug591198_inner.html";
let res = (yield);
is(res.widths[0], res.widths[2], "binding was rendered");
isnot(res.widths[0], res.widths[1], "binding was rendered");
is(res.anonChildCount, 2, "correct number of anon children");
iframe.src = "http://noxul.example.com/tests/content/xbl/test/file_bug591198_inner.html";
let res = (yield);
is(res.widths[0], res.widths[1], "binding was not rendered");
isnot(res.widths[0], res.widths[2], "binding was not rendered");
is("anonChildCount" in res, false, "no anon children");
SimpleTest.finish();
yield;
}
</script>
</pre>
</body>
</html>