From fda8bebb2bd03c203ec388ede494def536c85bcc Mon Sep 17 00:00:00 2001 From: Philipp Wagner Date: Mon, 30 Jan 2012 15:54:54 +0100 Subject: [PATCH] Bug 694754 - Accessing DOM Document methods lookupPrefix, lookupNamespaceURI and isDefaultNamespace through XPCOM and quickstubs should create equal results. r=jonas --- content/base/src/nsDocument.cpp | 9 ++-- content/base/test/Makefile.in | 1 + content/base/test/test_bug694754.xhtml | 70 ++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 6 deletions(-) create mode 100644 content/base/test/test_bug694754.xhtml diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index d9babf897b7..f6f3b6e038d 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -5847,24 +5847,21 @@ nsDocument::SetTextContent(const nsAString & aTextContent) NS_IMETHODIMP nsDocument::LookupPrefix(const nsAString & namespaceURI, nsAString & aResult) { - SetDOMStringToNull(aResult); - return NS_OK; + return nsINode::LookupPrefix(namespaceURI, aResult); } NS_IMETHODIMP nsDocument::IsDefaultNamespace(const nsAString & namespaceURI, bool *aResult) { - *aResult = namespaceURI.IsEmpty(); - return NS_OK; + return nsINode::IsDefaultNamespace(namespaceURI, aResult); } NS_IMETHODIMP nsDocument::LookupNamespaceURI(const nsAString & prefix, nsAString & aResult) { - SetDOMStringToNull(aResult); - return NS_OK; + return nsINode::LookupNamespaceURI(prefix, aResult); } NS_IMETHODIMP diff --git a/content/base/test/Makefile.in b/content/base/test/Makefile.in index 902ca7ac416..c1b9af6653c 100644 --- a/content/base/test/Makefile.in +++ b/content/base/test/Makefile.in @@ -529,6 +529,7 @@ _TEST_FILES2 = \ file_bug692434.xml \ test_bug693615.html \ test_bug693875.html \ + test_bug694754.xhtml \ test_bug698384.html \ test_nodelist_holes.html \ test_xhr_abort_after_load.html \ diff --git a/content/base/test/test_bug694754.xhtml b/content/base/test/test_bug694754.xhtml new file mode 100644 index 00000000000..f688fb9c32c --- /dev/null +++ b/content/base/test/test_bug694754.xhtml @@ -0,0 +1,70 @@ + + + + + Test for Bug 694754 + + + + +Mozilla Bug 694754 +

+ +
+
+
+ +