Closed Bug 572994 Opened 14 years ago Closed 14 years ago

Allow reading of complex preferences to retrieve the default homepage

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

(Whiteboard: [lib][mozmill-doc-needed])

Attachments

(1 file, 2 obsolete files)

In the last weeks we had a couple of situation when we failed to load the home page. Mainly those problems happened on Ubuntu due to the installed Ubufox extension.

Today I digged into this problem and checked possible solutions how to reliable retrieve the home page url. It has taken quite a while but now I'm sure we are on the right track. The solution is not to manually parse a properties file when reading the browser.startup.homepage pref, but simply to use the getComplexValue function from the nsIPrefBranch service.

I did some tests with the patch, which I will attach in a couple of seconds, and everything looks fine.
Attached patch Patch v1 (obsolete) — Splinter Review
Please test this patch as intensely as you can. I wasn't able to see a regression.
Attachment #452217 - Flags: review?(anthony.s.hughes)
Blocks: 572786
Whiteboard: [mozmill-doc-needed]
Comment on attachment 452217 [details] [diff] [review]
Patch v1

Codewise this is good and does not cause regressions, so r+.  However, this does not solve this issue reported in bug 572786.
Attachment #452217 - Flags: review?(anthony.s.hughes) → review+
Attached patch Patch v2 (obsolete) — Splinter Review
(In reply to comment #2)
> (From update of attachment 452217 [details] [diff] [review])
> Codewise this is good and does not cause regressions, so r+.  However, this
> does not solve this issue reported in bug 572786.

You are right and we have discussed that in a pm. So the solution we really need, and that getDefaultHompage() should do, is to query the defaultBranch. Only this branch will contain the original values.
Attachment #452217 - Attachment is obsolete: true
Attachment #452342 - Flags: review?(anthony.s.hughes)
Attachment #452342 - Attachment is obsolete: true
Attachment #452342 - Flags: review?(anthony.s.hughes)
Attached patch Patch v2.1Splinter Review
Now without modifications to the test file.
Attachment #452345 - Flags: review?(anthony.s.hughes)
Attachment #452345 - Flags: review?(anthony.s.hughes) → review+
This resolves the issue on bug 572786. r+
I had to check-in a bustage fix for testGeolocation.js. It's the only test which was using PrefsAPI.preferences.branch and I forgot to change.

http://hg.mozilla.org/qa/mozmill-tests/rev/1c70006a0280
http://hg.mozilla.org/qa/mozmill-tests/rev/c81531fde515
http://hg.mozilla.org/qa/mozmill-tests/rev/4311c24c33a4
Status: RESOLVED → VERIFIED
Assignee: hskupin → nobody
Component: Mozmill → Mozmill Tests
QA Contact: mozmill → mozmilltests
Summary: [shared module] Allow reading of complex preferences to retrieve the default homepage → Allow reading of complex preferences to retrieve the default homepage
Whiteboard: [mozmill-doc-needed] → [shared module][mozmill-doc-needed]
Assignee: nobody → hskupin
Move of Mozmill Test related project bugs to newly created components. You can
filter out those emails by using "Mozmill-Tests-to-MozillaQA" as criteria.
Product: Testing → Mozilla QA
Version: Trunk → unspecified
Component: Mozmill Tests → Mozmill Shared Modules
Component: Mozmill Shared Modules → Mozmill Tests
Whiteboard: [shared module][mozmill-doc-needed] → [lib]
Whiteboard: [lib] → [lib][mozmill-doc-needed]
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: