Last Comment Bug 737314 - [SeaMonkey] 2 "test_bug650776.html | Wrong sanitizer result"
: [SeaMonkey] 2 "test_bug650776.html | Wrong sanitizer result"
Status: VERIFIED FIXED
[perma-orange]
:
Product: MailNews Core
Classification: Components
Component: Networking (show other bugs)
: Trunk
: All All
: P2 major (vote)
: Thunderbird 14.0
Assigned To: Henri Sivonen (:hsivonen)
:
Mentors:
http://mxr.mozilla.org/mozilla-centra...
Depends on: 189358
Blocks: SmTestFail 650776
  Show dependency treegraph
 
Reported: 2012-03-19 20:26 PDT by Serge Gautherie (:sgautherie)
Modified: 2012-03-22 22:37 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Untested supposed fix (1000 bytes, patch)
2012-03-19 23:58 PDT, Henri Sivonen (:hsivonen)
no flags Details | Diff | Review
Route around nsIURI for cid: URLs (2.91 KB, patch)
2012-03-20 02:28 PDT, Henri Sivonen (:hsivonen)
bugs: review+
Details | Diff | Review

Description Serge Gautherie (:sgautherie) 2012-03-19 20:26:35 PDT
{
305 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/content/base/test/chrome/test_bug650776.html | Wrong sanitizer result 8 - got <html><head></head><body><img></body></html>, expected <html><head></head><body><img src="cid:foo"></body></html>

310 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/content/base/test/chrome/test_bug650776.html | Wrong sanitizer result 13 - got <html><head></head><body></body></html>, expected <html><head></head><body background="cid:foo"></body></html>
}

Fwiw, I noticed (at least) the following errors:
{
Security Error: Content at moz-nullprincipal:{9503dc11-62d7-41d9-95d2-f413b7ab7798} may not load or link to about:blank.

Security Error: Content at moz-nullprincipal:{3611fea8-39b1-4c39-ab0f-3bd3988fed0b} may not load or link to about:blank.
}
Are they expected?
Comment 1 Henri Sivonen (:hsivonen) 2012-03-19 23:43:54 PDT
(In reply to Serge Gautherie (:sgautherie) from comment #0)
> {
> 305 ERROR TEST-UNEXPECTED-FAIL |
> chrome://mochitests/content/chrome/content/base/test/chrome/test_bug650776.
> html | Wrong sanitizer result 8 - got
> <html><head></head><body><img></body></html>, expected
> <html><head></head><body><img src="cid:foo"></body></html>
> 
> 310 ERROR TEST-UNEXPECTED-FAIL |
> chrome://mochitests/content/chrome/content/base/test/chrome/test_bug650776.
> html | Wrong sanitizer result 13 - got
> <html><head></head><body></body></html>, expected <html><head></head><body
> background="cid:foo"></body></html>
> }

This is weird. Works on m-c. Could it be that comm-central has a special implementation class for cid: URLs and the SchemeIs method of that class is broken?

> Fwiw, I noticed (at least) the following errors:
> {
> Security Error: Content at
> moz-nullprincipal:{9503dc11-62d7-41d9-95d2-f413b7ab7798} may not load or
> link to about:blank.
> 
> Security Error: Content at
> moz-nullprincipal:{3611fea8-39b1-4c39-ab0f-3bd3988fed0b} may not load or
> link to about:blank.
> }
> Are they expected?

This is expected (albeit annoying) behavior. Bug 733935.
Comment 2 Henri Sivonen (:hsivonen) 2012-03-19 23:58:55 PDT
Created attachment 607468 [details] [diff] [review]
Untested supposed fix
Comment 3 Henri Sivonen (:hsivonen) 2012-03-20 01:48:49 PDT
Comment on attachment 607468 [details] [diff] [review]
Untested supposed fix

This patch doesn't actually fix the problem. Sigh.
Comment 4 Serge Gautherie (:sgautherie) 2012-03-20 02:27:28 PDT
(In reply to Henri Sivonen (:hsivonen) from comment #3)
> This patch doesn't actually fix the problem. Sigh.

(Yet, if the patch is correct, we could as well do it...)
Comment 5 Henri Sivonen (:hsivonen) 2012-03-20 02:28:23 PDT
Created attachment 607492 [details] [diff] [review]
Route around nsIURI for cid: URLs
Comment 6 Henri Sivonen (:hsivonen) 2012-03-20 02:33:05 PDT
The code that's causing the problem is the fix for bug 189358.
Comment 7 Serge Gautherie (:sgautherie) 2012-03-20 02:59:42 PDT
Does this mean SeaMonkey is in some kind a suboptimal situation with that MailNews code interfering in its Browser part (where it shouldn't)?
Comment 8 Henri Sivonen (:hsivonen) 2012-03-20 03:24:19 PDT
(In reply to Serge Gautherie (:sgautherie) from comment #7)
> Does this mean SeaMonkey is in some kind a suboptimal situation with that
> MailNews code interfering in its Browser part (where it shouldn't)?

When only mozilla-central code is running, cid: URLs are generic unknown URLs. When comm-central code has been loaded, too, there's an intentionally bogus implementation of cid: participating in the nsIURI factory.

This isn't really a "browser part". The feature whose test fails is meant for mailnews use, but I previously tested it using mozilla-central-only code, because I didn't realize comm-central would inject intentionally bogus stuff into the nsIURI factory.
Comment 9 Serge Gautherie (:sgautherie) 2012-03-20 03:39:08 PDT
(In reply to Henri Sivonen (:hsivonen) from comment #8)

Good then. Thanks for the explanation..
Comment 10 Henri Sivonen (:hsivonen) 2012-03-20 04:18:53 PDT
Comment on attachment 607492 [details] [diff] [review]
Route around nsIURI for cid: URLs

See http://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsCidProtocolHandler.cpp?force=1#71 for the reason why cid: nsIURIs are useless when comm-central code participates.
Comment 11 Olli Pettay [:smaug] 2012-03-20 05:02:16 PDT
Comment on attachment 607492 [details] [diff] [review]
Route around nsIURI for cid: URLs

Horrible but ok.
Comment 12 Henri Sivonen (:hsivonen) 2012-03-20 07:05:25 PDT
Thanks. Landed.
https://hg.mozilla.org/integration/mozilla-inbound/rev/2906d8671454
Comment 13 Mounir Lamouri (:mounir) 2012-03-21 03:54:08 PDT
https://hg.mozilla.org/mozilla-central/rev/2906d8671454
Comment 14 Serge Gautherie (:sgautherie) 2012-03-22 22:37:32 PDT
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1332369210.1332371127.13878.gz
OS X 10.5 comm-central-trunk debug test mochitest-other on 2012/03/21 15:33:30

V.Fixed

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