|
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"> |
|
15 |
|
16 </div> |
|
17 <pre id="test"> |
|
18 <script class="testbody" type="text/javascript"> |
|
19 |
|
20 /** Test for Bug 408328 **/ |
|
21 SimpleTest.waitForExplicitFinish(); |
|
22 |
|
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); |
|
32 |
|
33 </script> |
|
34 </pre> |
|
35 </body> |
|
36 </html> |
|
37 |