summaryrefslogtreecommitdiff
path: root/browser/components/feeds
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2014-07-02 00:07:24 -0400
committerMatt A. Tobin <email@mattatobin.com>2014-07-02 05:58:53 -0400
commit77707b62085f862709562185e615634e7431080a (patch)
treecb1d173d0dbae3332df6d4a1160336e04c2286a7 /browser/components/feeds
parent432326d2eae38aaacaeff9e790a2835d6578ee3b (diff)
downloadpalemoon-gre-77707b62085f862709562185e615634e7431080a.tar.gz
Remove tests from /browser (except /browser/metro)
Diffstat (limited to 'browser/components/feeds')
-rw-r--r--browser/components/feeds/moz.build2
-rw-r--r--browser/components/feeds/test/Makefile.in27
-rw-r--r--browser/components/feeds/test/bug368464-data.xml18
-rw-r--r--browser/components/feeds/test/bug408328-data.xml63
-rw-r--r--browser/components/feeds/test/bug436801-data.xml44
-rw-r--r--browser/components/feeds/test/bug494328-data.xml24
-rw-r--r--browser/components/feeds/test/bug589543-data.xml23
-rw-r--r--browser/components/feeds/test/chrome/Makefile.in27
-rw-r--r--browser/components/feeds/test/chrome/moz.build6
-rw-r--r--browser/components/feeds/test/chrome/sample_feed.atom23
-rw-r--r--browser/components/feeds/test/chrome/test_423060.xul56
-rw-r--r--browser/components/feeds/test/chrome/test_bug368464.html32
-rw-r--r--browser/components/feeds/test/chrome/test_bug408328.html37
-rw-r--r--browser/components/feeds/test/chrome/test_maxSniffing.html37
-rw-r--r--browser/components/feeds/test/moz.build11
-rw-r--r--browser/components/feeds/test/test_bug436801.html118
-rw-r--r--browser/components/feeds/test/test_bug494328.html36
-rw-r--r--browser/components/feeds/test/test_bug589543.html33
-rw-r--r--browser/components/feeds/test/test_registerHandler.html85
-rw-r--r--browser/components/feeds/test/unit/head_feeds.js5
-rw-r--r--browser/components/feeds/test/unit/test_355473.js27
-rw-r--r--browser/components/feeds/test/unit/test_758990.js42
-rw-r--r--browser/components/feeds/test/unit/xpcshell.ini7
-rw-r--r--browser/components/feeds/test/valid-feed.xml23
-rw-r--r--browser/components/feeds/test/valid-unsniffable-feed.xml32
25 files changed, 1 insertions, 837 deletions
diff --git a/browser/components/feeds/moz.build b/browser/components/feeds/moz.build
index 92950f537..76218104c 100644
--- a/browser/components/feeds/moz.build
+++ b/browser/components/feeds/moz.build
@@ -5,4 +5,4 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += ['public', 'src']
-TEST_DIRS += ['test']
+
diff --git a/browser/components/feeds/test/Makefile.in b/browser/components/feeds/test/Makefile.in
deleted file mode 100644
index bfc6e9869..000000000
--- a/browser/components/feeds/test/Makefile.in
+++ /dev/null
@@ -1,27 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DEPTH = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-relativesrcdir = @relativesrcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MOCHITEST_FILES = \
- bug408328-data.xml \
- bug368464-data.xml \
- test_bug494328.html \
- bug494328-data.xml \
- test_bug589543.html \
- bug589543-data.xml \
- test_bug436801.html \
- bug436801-data.xml \
- test_registerHandler.html \
- valid-feed.xml \
- valid-unsniffable-feed.xml \
- $(NULL)
-
-include $(topsrcdir)/config/rules.mk
diff --git a/browser/components/feeds/test/bug368464-data.xml b/browser/components/feeds/test/bug368464-data.xml
deleted file mode 100644
index 2745b061d..000000000
--- a/browser/components/feeds/test/bug368464-data.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
- <rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://my.netscape.com/rdf/simple/0.9/">
- <channel>
- <title>Tinderbox - Firefox</title>
- <description>Build bustages for Firefox</description>
- <link>http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox</link>
- </channel>
- <image>
- <title>Bad</title>
- <url>http://tinderbox.mozilla.org/channelflames.gif</url>
- <link>http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox</link>
- </image>
- <item><title>The tree is currently closed</title><link>http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox</link></item>
-
-<item><title>MacOSX Darwin 8.8.4 qm-xserve01 dep unit test is in flames</title><link>http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox</link></item>
-</rdf:RDF>
diff --git a/browser/components/feeds/test/bug408328-data.xml b/browser/components/feeds/test/bug408328-data.xml
deleted file mode 100644
index e9385e5ab..000000000
--- a/browser/components/feeds/test/bug408328-data.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2003-12-13T18:30:02Z</updated>
-
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
-
- <entry>
-
- <title>Good item</title>
- <link href="http://example.org/first"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
- <entry>
-
- <title>data: link</title>
- <link href="data:text/plain,Hi"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6b</id>
- <updated>2003-12-13T18:30:03Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
- <entry>
-
- <title>javascript: link</title>
- <link href="javascript:alert('Hi')"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6c</id>
- <updated>2003-12-13T18:30:04Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
- <entry>
-
- <title>file: link</title>
- <link href="file:///var/"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6d</id>
- <updated>2003-12-13T18:30:05Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
- <entry>
-
- <title>chrome: link</title>
- <link href="chrome://browser/content/browser.js"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6e</id>
- <updated>2003-12-13T18:30:06Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
-</feed>
diff --git a/browser/components/feeds/test/bug436801-data.xml b/browser/components/feeds/test/bug436801-data.xml
deleted file mode 100644
index 0e45c7ed8..000000000
--- a/browser/components/feeds/test/bug436801-data.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<feed xmlns="http://www.w3.org/2005/Atom" xml:base="http://www.example.com/">
-
- <title type="xhtml" xml:base="/foo/bar/">
- <div xmlns="http://www.w3.org/1999/xhtml">Example of a <em>special</em> feed (<img height="20px" src="baz.png" alt="base test sprite"/>)</div>
- </title>
-
- <subtitle type="html" xml:base="/foo/bar/">
- <![CDATA[
- With a <em>special</em> subtitle (<img height="20px" src="baz.png" alt="base test sprite"/>)
- ]]>
- </subtitle>
-
- <link href="http://example.org/"/>
-
- <updated>2010-09-02T18:30:02Z</updated>
-
- <author>
- <name>John Doe</name>
- </author>
-
- <id>urn:uuid:22906062-ecbd-46e2-b6a7-3039506a398f</id>
-
- <entry>
- <title type="xhtml" xml:base="/foo/bar/">
- <div xmlns="http://www.w3.org/1999/xhtml">Some <abbr title="Extensible Hyper-text Mark-up Language">XHTML</abbr> examples (<img height="20px" src="baz.png" alt="base test sprite"/>)</div>
- </title>
- <id>urn:uuid:b48083a7-71a7-4c9c-8515-b7c0d22955e7</id>
- <updated>2010-09-02T18:30:02Z</updated>
- <summary>Some text.</summary>
- </entry>
-
- <entry>
- <title type="html" xml:base="/foo/bar/">
- <![CDATA[
- Some <abbr title="Hyper-text Mark-up Language">HTML</abbr> examples (<img height="20px" src="baz.png" alt="base test sprite"/>)
- ]]>
- </title>
- <id>urn:uuid:1424967a-280a-414d-b0ab-8b11c4ac1bb7</id>
- <updated>2010-09-02T18:30:02Z</updated>
- <summary>Some text.</summary>
- </entry>
-
-</feed>
diff --git a/browser/components/feeds/test/bug494328-data.xml b/browser/components/feeds/test/bug494328-data.xml
deleted file mode 100644
index 58342bafc..000000000
--- a/browser/components/feeds/test/bug494328-data.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<rss version="2.0">
- <channel>
- <title>Channel title</title>
- <description>Channel description</description>
- <link>Channel link</link>
- <item>
- <title>Episode 1</title>
- <enclosure url="http://www.example.com/podcasts/Episode%201" length="0" type="audio/x-m4a" />
- </item>
- <item>
- <title>Episode 2</title>
- <enclosure url="http://www.example.com/podcasts/Episode%20%232" length="0" type="audio/x-m4a" />
- </item>
- <item>
- <title>Episode 3</title>
- <enclosure url="http://www.example.com/podcasts/Episode%20%233/" length="0" type="audio/x-m4a" />
- </item>
- <item>
- <title>Episode 4</title>
- <enclosure url="http://www.example.com/podcasts/Is%20This%20Episode%20%234%3F" length="0" type="audio/x-m4a" />
- </item>
- </channel>
-</rss>
diff --git a/browser/components/feeds/test/bug589543-data.xml b/browser/components/feeds/test/bug589543-data.xml
deleted file mode 100644
index 0e700b6d8..000000000
--- a/browser/components/feeds/test/bug589543-data.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2010-08-22T18:30:02Z</updated>
-
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:e2df8375-99be-4848-b05e-b9d407555267</id>
-
- <entry>
-
- <title>Item</title>
- <link href="http://example.org/first"/>
- <id>urn:uuid:9e0f4bed-33d3-4a9d-97ab-ecaa31b3f14a</id>
- <updated>2010-08-22T18:30:02Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
-</feed>
diff --git a/browser/components/feeds/test/chrome/Makefile.in b/browser/components/feeds/test/chrome/Makefile.in
deleted file mode 100644
index 020e4b652..000000000
--- a/browser/components/feeds/test/chrome/Makefile.in
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DEPTH = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-relativesrcdir = @relativesrcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-# sample_feed.atom was copied from toolkit/components/places/tests/chrome
-MOCHITEST_FILES = \
- sample_feed.atom \
- $(NULL)
-
-MOCHITEST_CHROME_FILES = \
- test_423060.xul \
- test_bug368464.html \
- test_bug408328.html \
- test_maxSniffing.html \
- $(NULL)
-
-include $(topsrcdir)/config/rules.mk
-
diff --git a/browser/components/feeds/test/chrome/moz.build b/browser/components/feeds/test/chrome/moz.build
deleted file mode 100644
index 895d11993..000000000
--- a/browser/components/feeds/test/chrome/moz.build
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
diff --git a/browser/components/feeds/test/chrome/sample_feed.atom b/browser/components/feeds/test/chrome/sample_feed.atom
deleted file mode 100644
index add75efb4..000000000
--- a/browser/components/feeds/test/chrome/sample_feed.atom
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2003-12-13T18:30:02Z</updated>
-
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
-
- <entry>
-
- <title>Atom-Powered Robots Run Amok</title>
- <link href="http://example.org/2003/12/13/atom03"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
-</feed>
diff --git a/browser/components/feeds/test/chrome/test_423060.xul b/browser/components/feeds/test/chrome/test_423060.xul
deleted file mode 100644
index 465cf2dd2..000000000
--- a/browser/components/feeds/test/chrome/test_423060.xul
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<window title="Make sure feed preview works when a default reader is selected"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml" />
-
- <script type="application/javascript">
- SimpleTest.waitForExplicitFinish();
-
- const Cc = Components.classes;
- const Ci = Components.interfaces;
-
- var wccrID = "@mozilla.org/embeddor.implemented/web-content-handler-registrar;1";
- /* abort the test if web feed handlers are not available */
- if (!Cc[wccrID])
- SimpleTest.finish()
-
- /* Turn off the first run UI */
- var prefBranch = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
- prefBranch.setBoolPref("browser.feeds.showFirstRunUI", false);
-
- /* register a handler for the feed type */
- const MAYBE_FEED = "application/vnd.mozilla.maybe.feed";
- var handlerPage = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/demohandler.html?feedurl=%s";
- var wccr = Cc[wccrID].getService(Ci.nsIWebContentConverterService);
- wccr.registerContentHandler(MAYBE_FEED, handlerPage, "Demo handler", null);
- var demoHandler = wccr.getWebContentHandlerByURI(MAYBE_FEED, handlerPage);
- wccr.setAutoHandler(MAYBE_FEED, demoHandler);
-
- /* Don't show the preview page */
- prefBranch.setCharPref("browser.feeds.handler", "reader");
-
- function finishUp() {
- var theframe = document.getElementById('theframe');
- var previewURL = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/demohandler.html?feedurl=http%3A%2F%2Fmochi.test%3A8888%2Ftests%2Ftoolkit%2Fcomponents%2Fplaces%2Ftests%2Fchrome%2Fsample_feed.atom";
- is(theframe.contentDocument.URL, previewURL);
-
- /* remove our demoHandler */
- wccr.setAutoHandler(MAYBE_FEED, null);
- wccr.removeContentHandler(MAYBE_FEED, handlerPage);
- prefBranch.setCharPref("browser.feeds.handler", "ask");
- prefBranch.setBoolPref("browser.feeds.showFirstRunUI", true);
-
- SimpleTest.finish();
- }
- </script>
- <html:iframe src="http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/sample_feed.atom" height="400px"
- id="theframe" onload="finishUp();">
- </html:iframe>
-</window>
diff --git a/browser/components/feeds/test/chrome/test_bug368464.html b/browser/components/feeds/test/chrome/test_bug368464.html
deleted file mode 100644
index dd7486f66..000000000
--- a/browser/components/feeds/test/chrome/test_bug368464.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=368464
--->
-<head>
- <title>Test that RSS 0.90 isn't sniffed</title>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=368464">Mozilla Bug 368464</a>
-<p id="display"><iframe id="testFrame" src="http://mochi.test:8888/tests/browser/components/feeds/test/bug368464-data.xml"></iframe></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Bug 368464 **/
-SimpleTest.waitForExplicitFinish();
-
-addLoadEvent(function() {
- ok($("testFrame").contentDocument.documentElement.id != "feedHandler",
- "RSS 0.90 shouldn't be sniffed as a feed");
-});
-addLoadEvent(SimpleTest.finish);
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/browser/components/feeds/test/chrome/test_bug408328.html b/browser/components/feeds/test/chrome/test_bug408328.html
deleted file mode 100644
index e4901320a..000000000
--- a/browser/components/feeds/test/chrome/test_bug408328.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=408328
--->
-<head>
- <title>Test feed preview safe-linkification</title>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=408328">Mozilla Bug 408328</a>
-<p id="display"><iframe id="testFrame" src="http://mochi.test:8888/tests/browser/components/feeds/test/bug408328-data.xml"></iframe></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Bug 408328 **/
-SimpleTest.waitForExplicitFinish();
-
-addLoadEvent(function() {
- var links = $("testFrame").contentDocument.getElementById("feedContent").getElementsByTagName("a");
- is(links.length, 5, "wrong number of linked items in feed preview");
- for (var i = 0; i < links.length; i++) {
- if (links[i].href)
- is(links[i].href, "http://example.org/first", "bad linkified item");
- }
-});
-addLoadEvent(SimpleTest.finish);
-
-</script>
-</pre>
-</body>
-</html>
-
diff --git a/browser/components/feeds/test/chrome/test_maxSniffing.html b/browser/components/feeds/test/chrome/test_maxSniffing.html
deleted file mode 100644
index 7a2044687..000000000
--- a/browser/components/feeds/test/chrome/test_maxSniffing.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=739040
--->
-<head>
- <title>Test that we only sniff 512 bytes</title>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=739040">Mozilla Bug 739040</a>
-<p id="display">
- <iframe id="validTestFrame" src="http://mochi.test:8888/tests/browser/components/feeds/test/valid-feed.xml"></iframe>
- <iframe id="unsniffableTestFrame" src="http://mochi.test:8888/tests/browser/components/feeds/test/valid-unsniffable-feed.xml"></iframe>
-</p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Bug 739040 **/
-SimpleTest.waitForExplicitFinish();
-
-addLoadEvent(function() {
- is($("validTestFrame").contentDocument.documentElement.id, "feedHandler",
- "valid feed should be sniffed");
- isnot($("unsniffableTestFrame").contentDocument.documentElement.id, "feedHandler",
- "unsniffable feed should not be sniffed");
-});
-addLoadEvent(SimpleTest.finish);
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/browser/components/feeds/test/moz.build b/browser/components/feeds/test/moz.build
deleted file mode 100644
index 51e55b106..000000000
--- a/browser/components/feeds/test/moz.build
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DIRS += ['chrome']
-
-MODULE = 'test_browser_feeds'
-
-XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
diff --git a/browser/components/feeds/test/test_bug436801.html b/browser/components/feeds/test/test_bug436801.html
deleted file mode 100644
index a72d2c11a..000000000
--- a/browser/components/feeds/test/test_bug436801.html
+++ /dev/null
@@ -1,118 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=436801
--->
-<head>
- <title>Test feed preview subscribe UI</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>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=436801">Mozilla Bug 436801</a>
-<p id="display"><iframe id="testFrame" src="bug436801-data.xml"></iframe></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-SimpleTest.waitForExplicitFinish();
-
-addLoadEvent(function () {
- var doc = SpecialPowers.wrap($("testFrame")).contentDocument;
-
- checkNode(doc.getElementById("feedTitleText"), [
- "ELEMENT", "h1", { "xml:base": "http://www.example.com/foo/bar/" }, [
- ["TEXT", "Example of a "],
- ["ELEMENT", "em", [
- ["TEXT", "special"],
- ]],
- ["TEXT", " feed ("],
- ["ELEMENT", "img", { "src": "baz.png" }],
- ["TEXT", ")"],
- ]
- ]);
-
- checkNode(doc.getElementById("feedSubtitleText"), [
- "ELEMENT", "h2", { "xml:base": "http://www.example.com/foo/bar/" }, [
- ["TEXT", "With a "],
- ["ELEMENT", "em", [
- ["TEXT", "special"],
- ]],
- ["TEXT", " subtitle ("],
- ["ELEMENT", "img", { "src": "baz.png" }],
- ["TEXT", ")"],
- ]
- ]);
-
- checkNode(doc.querySelector(".entry").firstChild.firstChild.firstChild, [
- "ELEMENT", "span", { "xml:base": "http://www.example.com/foo/bar/" }, [
- ["TEXT", "Some "],
- ["ELEMENT", "abbr", { title: "Extensible Hyper-text Mark-up Language" }, [
- ["TEXT", "XHTML"],
- ]],
- ["TEXT", " examples ("],
- ["ELEMENT", "img", { "src": "baz.png" }],
- ["TEXT", ")"],
- ]
- ]);
-
- checkNode(doc.querySelectorAll(".entry")[1].firstChild.firstChild.firstChild, [
- "ELEMENT", "span", { "xml:base": "http://www.example.com/foo/bar/" }, [
- ["TEXT", "Some "],
- ["ELEMENT", "abbr", { title: "Hyper-text Mark-up Language" }, [
- ["TEXT", "HTML"],
- ]],
- ["TEXT", " examples ("],
- ["ELEMENT", "img", { "src": "baz.png" }],
- ["TEXT", ")"],
- ]
- ]);
-});
-
-addLoadEvent(SimpleTest.finish);
-
-function checkNode(node, schema) {
- var typeName = schema.shift() + "_NODE";
- var type = Node[typeName];
- is(node.nodeType, type, "Node should be expected type " + typeName);
- if (type == Node.TEXT_NODE) {
- var text = schema.shift();
- is(node.data, text, "Text should match");
- return;
- }
- // type == Node.ELEMENT_NODE
- var tag = schema.shift();
- is(node.localName, tag, "Element should have expected tag");
- while (schema.length) {
- var val = schema.shift();
- if (Array.isArray(val))
- var childSchema = val;
- else
- var attrSchema = val;
- }
- if (attrSchema) {
- var nsTable = {
- xml: "http://www.w3.org/XML/1998/namespace",
- };
- for (var name in attrSchema) {
- var [ns, nsName] = name.split(":");
- var val = nsName ? node.getAttributeNS(nsTable[ns], nsName) :
- node.getAttribute(name);
- is(val, attrSchema[name], "Attribute " + name + " should match");
- }
- }
- if (childSchema) {
- var numChildren = node.childNodes.length;
- is(childSchema.length, numChildren,
- "Element should have expected number of children");
- for (var i = 0; i < numChildren; i++)
- checkNode(node.childNodes[i], childSchema[i]);
- }
-}
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/browser/components/feeds/test/test_bug494328.html b/browser/components/feeds/test/test_bug494328.html
deleted file mode 100644
index 054f62c1d..000000000
--- a/browser/components/feeds/test/test_bug494328.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=494328
--->
-<head>
- <title>Test for bug 494328</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=494328">Mozilla Bug 494328</a>
-<p id="display"><iframe id="testFrame" src="bug494328-data.xml"></iframe></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Bug 494328 **/
-SimpleTest.waitForExplicitFinish();
-
-addLoadEvent(function() {
- var links = SpecialPowers.wrap($("testFrame")).contentDocument.getElementById("feedContent").querySelectorAll("div.enclosure > a");
- is(links[0].textContent, "Episode 1", "filename decoded incorrectly");
- is(links[1].textContent, "Episode #2", "filename decoded incorrectly");
- is(links[2].textContent, "http://www.example.com/podcasts/Episode #3/", "filename decoded incorrectly");
- is(links[3].textContent, "Is This Episode #4?", "filename decoded incorrectly");
-});
-addLoadEvent(SimpleTest.finish);
-
-</script>
-</pre>
-</body>
-</html>
-
diff --git a/browser/components/feeds/test/test_bug589543.html b/browser/components/feeds/test/test_bug589543.html
deleted file mode 100644
index a6dd0b283..000000000
--- a/browser/components/feeds/test/test_bug589543.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=589543
--->
-<head>
- <title>Test feed preview subscribe UI</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=589543">Mozilla Bug 589543</a>
-<p id="display"><iframe id="testFrame" src="bug589543-data.xml"></iframe></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Bug 589543 **/
-SimpleTest.waitForExplicitFinish();
-
-addLoadEvent(function() {
- var doc = SpecialPowers.wrap($("testFrame")).contentDocument;
- var daddy = doc.getElementById("feedSubscribeLine");
- var popup = doc.getAnonymousElementByAttribute(daddy, "anonid", "handlersMenuPopup");
- isnot(popup, null, "Feed preview should have a handlers popup");
-});
-addLoadEvent(SimpleTest.finish);
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/browser/components/feeds/test/test_registerHandler.html b/browser/components/feeds/test/test_registerHandler.html
deleted file mode 100644
index 4df5f326d..000000000
--- a/browser/components/feeds/test/test_registerHandler.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=402788
--->
-<head>
- <title>Test for Bug 402788</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=402788">Mozilla Bug 402788</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Bug 402788 **/
-
- // return false if an exception has been catched, true otherwise
- function testRegisterHandler(aIsProtocol, aTxt, aUri, aTitle)
- {
- try {
- if (aIsProtocol)
- navigator.registerProtocolHandler(aTxt, aUri, aTitle);
- else
- navigator.registerContentHandler(aTxt, aUri, aTitle);
- }
- catch(e) {
- return false;
- }
-
- return true;
- }
-
- ok(navigator.registerProtocolHandler, "navigator.registerProtocolHandler should be defined");
- ok(navigator.registerContentHandler, "navigator.registerContentHandler should be defined");
-
- // testing a generic case
- is(true, testRegisterHandler(true, "foo", "http://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler should work");
- is(true, testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler should work");
-
- // testing with wrong uris
- is(false, testRegisterHandler(true, "foo", "http://mochi.test:8888/", "Foo handler"), "a protocol handler uri should contain %s");
- is(false, testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/", "Foo handler"), "a content handler uri should contain %s");
-
- // the spec says we should not throw here, but it probably needs to be changed
- is(false, testRegisterHandler(true, "foo", "foo/%s", "Foo handler"), "a protocol handler uri should be valid");
- is(false, testRegisterHandler(false, "application/rss+xml", "foo/%s", "Foo handler"), "a content handler uri should be valid");
-
- // we should only accept to register when the handler has the same host as the current page (bug 402287)
- is(false, testRegisterHandler(true, "foo", "http://remotehost:8888/%s", "Foo handler"), "registering a foo protocol handler with a different host should not work");
- is(false, testRegisterHandler(false, "application/rss+xml", "http://remotehost:8888/%s", "Foo handler"), "registering a foo content handler with a different host should not work");
-
- // restriction to http(s) for the uri of the handler (bug 401343)
- // https should work (http already tested in the generic case)
- is(true, testRegisterHandler(true, "foo", "https://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with https scheme should work");
- is(true, testRegisterHandler(false, "application/rss+xml", "https://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with https scheme should work");
- // ftp should not work
- is(false, testRegisterHandler(true, "foo", "ftp://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with ftp scheme should not work");
- is(false, testRegisterHandler(false, "application/rss+xml", "ftp://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with ftp scheme should not work");
- // chrome should not work
- is(false, testRegisterHandler(true, "foo", "chrome://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with chrome scheme should not work");
- is(false, testRegisterHandler(false, "application/rss+xml", "chrome://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with chrome scheme should not work");
- // foo should not work
- is(false, testRegisterHandler(true, "foo", "foo://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with foo scheme should not work");
- is(false, testRegisterHandler(false, "application/rss+xml", "foo://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with foo scheme should not work");
-
- // for security reasons, protocol handlers should never be registered for some schemes (chrome, vbscript, ...) (bug 402788)
- is(false, testRegisterHandler(true, "chrome", "http://mochi.test:8888/%s", "chrome handler"), "registering a chrome protocol handler should not work");
- is(false, testRegisterHandler(true, "vbscript", "http://mochi.test:8888/%s", "vbscript handler"), "registering a vbscript protocol handler should not work");
- is(false, testRegisterHandler(true, "javascript", "http://mochi.test:8888/%s", "javascript handler"), "registering a javascript protocol handler should not work");
- is(false, testRegisterHandler(true, "moz-icon", "http://mochi.test:8888/%s", "moz-icon handler"), "registering a moz-icon protocol handler should not work");
-
- // for security reasons, content handlers should never be registered for some types (html, ...)
- is(true, testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/%s", "Foo handler"), "registering rss content handlers should work");
- is(true, testRegisterHandler(false, "application/atom+xml", "http://mochi.test:8888/%s", "Foo handler"), "registering atom content handlers should work");
- todo(false, testRegisterHandler(false, "text/html", "http://mochi.test:8888/%s", "Foo handler"), "registering html content handlers should not work"); // bug 403798
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/browser/components/feeds/test/unit/head_feeds.js b/browser/components/feeds/test/unit/head_feeds.js
deleted file mode 100644
index 841f68157..000000000
--- a/browser/components/feeds/test/unit/head_feeds.js
+++ /dev/null
@@ -1,5 +0,0 @@
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cr = Components.results;
-
-var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
diff --git a/browser/components/feeds/test/unit/test_355473.js b/browser/components/feeds/test/unit/test_355473.js
deleted file mode 100644
index 54900a5a7..000000000
--- a/browser/components/feeds/test/unit/test_355473.js
+++ /dev/null
@@ -1,27 +0,0 @@
-function run_test() {
- var feedFeedURI = ios.newURI("feed://example.com/feed.xml", null, null);
- var httpFeedURI = ios.newURI("feed:http://example.com/feed.xml", null, null);
- var httpURI = ios.newURI("http://example.com/feed.xml", null, null);
-
- var httpsFeedURI =
- ios.newURI("feed:https://example.com/feed.xml", null, null);
- var httpsURI = ios.newURI("https://example.com/feed.xml", null, null);
-
- var feedChannel = ios.newChannelFromURI(feedFeedURI, null);
- var httpChannel = ios.newChannelFromURI(httpFeedURI, null);
- var httpsChannel = ios.newChannelFromURI(httpsFeedURI, null);
-
- // not setting .originalURI to the original URI is naughty
- do_check_true(feedFeedURI.equals(feedChannel.originalURI));
- do_check_true(httpFeedURI.equals(httpChannel.originalURI));
- do_check_true(httpsFeedURI.equals(httpsChannel.originalURI));
-
- // actually using the horrible mess that's a feed: URI is suicidal
- do_check_true(httpURI.equals(feedChannel.URI));
- do_check_true(httpURI.equals(httpChannel.URI));
- do_check_true(httpsURI.equals(httpsChannel.URI));
-
- // check that we don't throw creating feed: URIs from file and ftp
- var ftpFeedURI = ios.newURI("feed:ftp://example.com/feed.xml", null, null);
- var fileFeedURI = ios.newURI("feed:file:///var/feed.xml", null, null);
-}
diff --git a/browser/components/feeds/test/unit/test_758990.js b/browser/components/feeds/test/unit/test_758990.js
deleted file mode 100644
index 3a1dde770..000000000
--- a/browser/components/feeds/test/unit/test_758990.js
+++ /dev/null
@@ -1,42 +0,0 @@
-function run_test() {
- var success = false;
- try {
- var newURI = ios.newURI("feed:javascript:alert('hi');", null, null);
- }
- catch (e) {
- success = e.result == Cr.NS_ERROR_MALFORMED_URI;
- }
- if (!success)
- do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a feed:javascript: URI");
-
- success = false;
- try {
- newURI = ios.newURI("feed:data:text/html,hi", null, null);
- }
- catch (e) {
- success = e.result == Cr.NS_ERROR_MALFORMED_URI;
- }
- if (!success)
- do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a feed:data: URI");
-
- success = false;
- try {
- newURI = ios.newURI("pcast:javascript:alert('hi');", null, null);
- }
- catch (e) {
- success = e.result == Cr.NS_ERROR_MALFORMED_URI;
- }
- if (!success)
- do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a pcast:javascript: URI");
-
- success = false;
- try {
- newURI = ios.newURI("pcast:data:text/html,hi", null, null);
- }
- catch (e) {
- success = e.result == Cr.NS_ERROR_MALFORMED_URI;
- }
- if (!success)
- do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a pcast:data: URI");
-
-}
diff --git a/browser/components/feeds/test/unit/xpcshell.ini b/browser/components/feeds/test/unit/xpcshell.ini
deleted file mode 100644
index abe786897..000000000
--- a/browser/components/feeds/test/unit/xpcshell.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[DEFAULT]
-head = head_feeds.js
-tail =
-firefox-appdir = browser
-
-[test_355473.js]
-[test_758990.js]
diff --git a/browser/components/feeds/test/valid-feed.xml b/browser/components/feeds/test/valid-feed.xml
deleted file mode 100644
index 0e700b6d8..000000000
--- a/browser/components/feeds/test/valid-feed.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2010-08-22T18:30:02Z</updated>
-
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:e2df8375-99be-4848-b05e-b9d407555267</id>
-
- <entry>
-
- <title>Item</title>
- <link href="http://example.org/first"/>
- <id>urn:uuid:9e0f4bed-33d3-4a9d-97ab-ecaa31b3f14a</id>
- <updated>2010-08-22T18:30:02Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
-</feed>
diff --git a/browser/components/feeds/test/valid-unsniffable-feed.xml b/browser/components/feeds/test/valid-unsniffable-feed.xml
deleted file mode 100644
index e75315739..000000000
--- a/browser/components/feeds/test/valid-unsniffable-feed.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 512 bytes!
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- -->
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2010-08-22T18:30:02Z</updated>
-
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:e2df8375-99be-4848-b05e-b9d407555267</id>
-
- <entry>
-
- <title>Item</title>
- <link href="http://example.org/first"/>
- <id>urn:uuid:9e0f4bed-33d3-4a9d-97ab-ecaa31b3f14a</id>
- <updated>2010-08-22T18:30:02Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
-</feed>