The default bug view has changed. See this FAQ.

TEST-UNEXPECTED-FAIL | test_URIs.js | false == true for Thunderbird when running mailto: test

RESOLVED FIXED in Thunderbird 7.0

Status

MailNews Core
Backend
RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: standard8, Assigned: neil@parkwaycc.co.uk)

Tracking

Trunk
Thunderbird 7.0

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
With the patch on bug 658666, we're now running xpcshell-tests on mozilla-central again. test_URIs.js is now failing, because of a test added by bug 660066:

TEST-INFO | /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/netwerk/test/unit/test_URIs.js | [do_test_uri_basic : 257] testing mailto:webmaster@mozilla.com equals a clone of itself

TEST-INFO | /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/netwerk/test/unit/test_URIs.js | [do_check_uri_eq : 208] (uri equals check: 'mailto:webmaster@mozilla.com' == 'mailto:webmaster@mozilla.com')

TEST-PASS | /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/netwerk/test/unit/test_URIs.js | [do_check_uri_eq : 209] true == true

TEST-INFO | /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/netwerk/test/unit/test_URIs.js | [do_check_uri_eq : 210] (uri equals check: 'mailto:webmaster@mozilla.com' == 'mailto:webmaster@mozilla.com')

TEST-UNEXPECTED-FAIL | /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/netwerk/test/unit/test_URIs.js | false == true - See following stack:
JS frame :: /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/head.js :: do_throw :: line 445
JS frame :: /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/head.js :: _do_check_eq :: line 539
JS frame :: /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/head.js :: do_check_eq :: line 560
JS frame :: /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/head.js :: do_check_true :: line 574
JS frame :: /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/netwerk/test/unit/test_URIs.js :: do_check_uri_eq :: line 211
JS frame :: /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/netwerk/test/unit/test_URIs.js :: do_test_uri_basic :: line 258
JS frame :: /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/netwerk/test/unit/test_URIs.js :: <TOP_LEVEL> :: line 442
JS frame :: /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/netwerk/test/unit/test_URIs.js :: run_test :: line 440

I think this is saying that URI == URI.clone(), but URI.clone() != URI for mailto URIs.

This would seem to be an issue with the code here:

http://hg.mozilla.org/comm-central/diff/e4f4569d451a/mailnews/compose/src/nsSmtpUrl.cpp
(Assignee)

Comment 1

6 years ago
Created attachment 539174 [details] [diff] [review]
Proposed patch

I originally wrote this for bug 658877 as I noticed that some of the methods didn't work as advertised.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #539174 - Flags: review?(mbanner)
Attachment #539174 - Flags: review?(dbienvenu)

Comment 2

6 years ago
If other is null, isn't this eventually going to return NS_ERROR_NULL_POINTER? In other words, couldn't we do NS_ENSURE_ARG_POINTER(other)? Or is there a reason to make the base url do it?

+  if (other)
+    return other->Equals(m_baseURL, _retval);
+
+  return m_baseURL->Equals(other, _retval);
(Assignee)

Comment 3

6 years ago
(In reply to comment #2)
> If other is null, isn't this eventually going to return
> NS_ERROR_NULL_POINTER? In other words, couldn't we do
> NS_ENSURE_ARG_POINTER(other)? Or is there a reason to make the base url do
> it?
1. It's possible that Equals might change its behaviour on a null parameter, and this lets us pick up that change for free.
2. You didn't complain in bug 546900 ;-)

Updated

6 years ago
Attachment #539174 - Flags: review?(dbienvenu) → review+
(Reporter)

Comment 4

6 years ago
Comment on attachment 539174 [details] [diff] [review]
Proposed patch

David reviewed this, and I believe it landed anyway.
Attachment #539174 - Flags: review?(mbanner)
(Reporter)

Comment 5

4 years ago
This landed here ages ago:

http://hg.mozilla.org/comm-central/rev/a9dbef5819f8
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 7.0
You need to log in before you can comment on or make changes to this bug.