dom/xbl/test/test_bug591198.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/xbl/test/test_bug591198.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,46 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=591198
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 591198</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 onload="gen.next();">
    1.15 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=591198">Mozilla Bug 591198</a>
    1.16 +<iframe id=iframe></iframe>
    1.17 +<pre id="test">
    1.18 +<script class="testbody" type="text/javascript;version=1.8">
    1.19 +
    1.20 +SimpleTest.waitForExplicitFinish();
    1.21 +
    1.22 +gen = runTest();
    1.23 +
    1.24 +function runTest() {
    1.25 +  let iframe = $('iframe');
    1.26 +  window.addEventListener("message", function(e) {
    1.27 +    gen.send(JSON.parse(e.data));
    1.28 +  }, false);
    1.29 +  
    1.30 +  iframe.src = "file_bug591198_inner.html";
    1.31 +  let res = (yield);
    1.32 +  is(res.widths[0], res.widths[2], "binding was rendered");
    1.33 +  isnot(res.widths[0], res.widths[1], "binding was rendered");
    1.34 +  is(res.anonChildCount, 2, "correct number of anon children");
    1.35 +
    1.36 +  iframe.src = "http://noxul.example.com/tests/dom/xbl/test/file_bug591198_inner.html";
    1.37 +  let res = (yield);
    1.38 +  is(res.widths[0], res.widths[1], "binding was not rendered");
    1.39 +  isnot(res.widths[0], res.widths[2], "binding was not rendered");
    1.40 +  is("anonChildCount" in res, false, "no anon children");
    1.41 +
    1.42 +  SimpleTest.finish();
    1.43 +  yield undefined;
    1.44 +}
    1.45 +
    1.46 +</script>
    1.47 +</pre>
    1.48 +</body>
    1.49 +</html>

mercurial