browser/components/feeds/test/chrome/test_bug408328.html

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=408328
     5 -->
     6 <head>
     7   <title>Test feed preview safe-linkification</title>
     8   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
    10 </head>
    11 <body>
    12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=408328">Mozilla Bug 408328</a>
    13 <p id="display"><iframe id="testFrame" src="http://mochi.test:8888/tests/browser/components/feeds/test/bug408328-data.xml"></iframe></p>
    14 <div id="content" style="display: none">
    16 </div>
    17 <pre id="test">
    18 <script class="testbody" type="text/javascript">
    20 /** Test for Bug 408328 **/
    21 SimpleTest.waitForExplicitFinish();
    23 addLoadEvent(function() {
    24   var links = $("testFrame").contentDocument.getElementById("feedContent").getElementsByTagName("a");
    25   is(links.length, 5, "wrong number of linked items in feed preview");
    26   for (var i = 0; i < links.length; i++) {
    27     if (links[i].href)
    28       is(links[i].href, "http://example.org/first", "bad linkified item");
    29   }
    30 });
    31 addLoadEvent(SimpleTest.finish);
    33 </script>
    34 </pre>
    35 </body>
    36 </html>

mercurial