diff --git a/mozilla/browser/base/Makefile.in b/mozilla/browser/base/Makefile.in index 29a578e2420..eab7a1ceb94 100644 --- a/mozilla/browser/base/Makefile.in +++ b/mozilla/browser/base/Makefile.in @@ -44,6 +44,10 @@ include $(DEPTH)/config/autoconf.mk include $(topsrcdir)/config/config.mk +ifdef MOZ_MOCHITEST +DIRS += content/test +endif + include $(topsrcdir)/config/rules.mk DEFINES += -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) diff --git a/mozilla/browser/base/content/test/Makefile.in b/mozilla/browser/base/content/test/Makefile.in new file mode 100644 index 00000000000..755832f96f0 --- /dev/null +++ b/mozilla/browser/base/content/test/Makefile.in @@ -0,0 +1,51 @@ +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is +# Mozilla Foundation. +# Portions created by the Initial Developer are Copyright (C) 2007 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the terms of +# either of the GNU General Public License Version 2 or later (the "GPL"), +# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +DEPTH = ../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ +relativesrcdir = browser/base/content/test + +include $(DEPTH)/config/autoconf.mk +include $(topsrcdir)/config/rules.mk + +_TEST_FILES = test_feed_discovery.html \ + feed_discovery.html \ + $(NULL) + +libs:: $(_TEST_FILES) + $(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir) diff --git a/mozilla/browser/base/content/test/feed_discovery.html b/mozilla/browser/base/content/test/feed_discovery.html new file mode 100644 index 00000000000..464c06b29af --- /dev/null +++ b/mozilla/browser/base/content/test/feed_discovery.html @@ -0,0 +1,113 @@ + + + + + Test for feed discovery + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mozilla/browser/base/content/test/test_feed_discovery.html b/mozilla/browser/base/content/test/test_feed_discovery.html new file mode 100644 index 00000000000..35149b155cb --- /dev/null +++ b/mozilla/browser/base/content/test/test_feed_discovery.html @@ -0,0 +1,57 @@ + + + + + Test for feed discovery + + + + + +Mozilla Bug 377611 +

+ +
+
+
+ + + diff --git a/mozilla/browser/base/content/utilityOverlay.js b/mozilla/browser/base/content/utilityOverlay.js index 935dcbb9f0d..4f62e6b276e 100644 --- a/mozilla/browser/base/content/utilityOverlay.js +++ b/mozilla/browser/base/content/utilityOverlay.js @@ -597,8 +597,8 @@ function recognizeFeedFromLink(aLink, aPrincipal) if (!aLink || !aPrincipal) return null; - var erel = aLink.rel; - var etype = aLink.type; + var erel = aLink.rel && aLink.rel.toLowerCase(); + var etype = aLink.type && aLink.type.toLowerCase(); var etitle = aLink.title; const rssTitleRegex = /(^|\s)rss($|\s)/i; var rels = {}; @@ -617,7 +617,6 @@ function recognizeFeedFromLink(aLink, aPrincipal) etype = etype.replace(/^\s+/, ""); etype = etype.replace(/\s+$/, ""); etype = etype.replace(/\s*;.*/, ""); - etype = etype.toLowerCase(); isFeed = (etype == "application/rss+xml" || etype == "application/atom+xml"); if (!isFeed) {