Last Comment Bug 664105 - TEST-UNEXPECTED-FAIL | test_URIs.js | false == true for Thunderbird when running mailto: test
: TEST-UNEXPECTED-FAIL | test_URIs.js | false == true for Thunderbird when runn...
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Thunderbird 7.0
Assigned To: neil@parkwaycc.co.uk
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-14 04:05 PDT by Mark Banner (:standard8)
Modified: 2013-01-01 11:52 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Proposed patch (9.65 KB, patch)
2011-06-14 04:38 PDT, neil@parkwaycc.co.uk
mozilla: review+
Details | Diff | Review

Description Mark Banner (:standard8) 2011-06-14 04:05:45 PDT
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
Comment 1 neil@parkwaycc.co.uk 2011-06-14 04:38:46 PDT
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.
Comment 2 David :Bienvenu 2011-06-14 10:19:39 PDT
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);
Comment 3 neil@parkwaycc.co.uk 2011-06-14 11:13:40 PDT
(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 ;-)
Comment 4 Mark Banner (:standard8) 2011-06-17 03:11:27 PDT
Comment on attachment 539174 [details] [diff] [review]
Proposed patch

David reviewed this, and I believe it landed anyway.
Comment 5 Mark Banner (:standard8) 2013-01-01 11:52:33 PST
This landed here ages ago:

http://hg.mozilla.org/comm-central/rev/a9dbef5819f8

Note You need to log in before you can comment on or make changes to this bug.