Closed
Bug 1168084
Opened 9 years ago
Closed 9 years ago
View source preferences should be persisted
Categories
(Toolkit :: View Source, defect)
Tracking
()
VERIFIED
FIXED
mozilla41
People
(Reporter: alice0775, Assigned: jryans)
References
Details
(Keywords: regression, Whiteboard: [Bugday-20150902])
Attachments
(1 file, 1 obsolete file)
Steps To Reproduce: 1. Open Web page 2. Ctrl+U open View Page Source 3. Right Click and Choose "Wrap Long Line" 4. Ctrl+w close the View Page Source 5. Repeat Step 2 Actual Results: State of the "Wrap Long Line" is reset Expected results: State of the "Wrap Long Line" should be persisted
Comment 1•9 years ago
|
||
[Tracking Requested - why for this release]: Regression in view-source functionality This also affects the Syntax highlighting setting.
tracking-firefox41:
--- → ?
Keywords: regression
Summary: State of the "Wrap Long Line" should be kept forever → View source preferences should be persisted
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jryans
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•9 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=a83b048f465c
Assignee | ||
Comment 3•9 years ago
|
||
/r/9407 - Bug 1168084 - Persist view source tab options. r=mconley Pull down this commit: hg pull -r e18b9a9c3bb3b77cf917cb268fa35bfd267ffbc3 https://reviewboard-hg.mozilla.org/gecko/
Assignee | ||
Comment 4•9 years ago
|
||
Fixed tests: https://treeherder.mozilla.org/#/jobs?repo=try&revision=1b6f132e2c94
Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8610929 [details] MozReview Request: bz://1168084/jryans /r/9407 - Bug 1168084 - Persist view source tab options. r=mconley Pull down this commit: hg pull -r b21067d7cdc1dd7d60d6c5cab56dc27c4ab9f8ec https://reviewboard-hg.mozilla.org/gecko/
Attachment #8610929 -
Flags: review?(mconley)
Adding a tracking flag for Firefox41. Another regression in View Source component.
Comment 7•9 years ago
|
||
https://reviewboard.mozilla.org/r/9405/#review8569 This looks good! Just one minor suggestion for the tests. ::: toolkit/components/viewsource/test/browser/browser_viewsourceprefs.js:44 (Diff revision 2) > + let prefReady = waitForStoreWrapping(win); Instead of wrapping the functions like this, you can use Preferences.jsm to observe the pref. That'll also test to make sure that the pref was actually updated. Example: ``` Cu.import("resource://gre/modules/PromiseUtils.jsm"); Cu.import("resource://gre/modules/Preferences.jsm"); // ... function waitForStorePref() { let deferred = PromiseUtils.defer(); let observer = () => { Preferences.ignore("view_source.wrap_long_lines", observer); deferred.resolve(); }; Preferences.observe("view_source.wrap_long_lines", observer); return deferred.promise; } ``` There are possibly better ways of structuring that - but I think I'd prefer this over patching the viewSourceChrome object. ::: toolkit/components/viewsource/test/browser/browser_viewsourceprefs.js:117 (Diff revision 2) > +function waitForStoreWrapping(win) { > + return new Promise(resolve => { > + let storeWrapping = win.viewSourceChrome.storeWrapping; > + win.viewSourceChrome.storeWrapping = state => { > + storeWrapping(state); > + win.viewSourceChrome.storeWrapping = storeWrapping; > + resolve(); > + }; > + }); > +} > + > +function waitForStoreSyntaxHighlighting(win) { > + return new Promise(resolve => { > + let storeSyntaxHighlighting = win.viewSourceChrome.storeSyntaxHighlighting; > + win.viewSourceChrome.storeSyntaxHighlighting = state => { > + storeSyntaxHighlighting(state); > + win.viewSourceChrome.storeSyntaxHighlighting = storeSyntaxHighlighting; > + resolve(); > + }; > + }); > +} See my comment above about using Preferences.jsm to observe that the preference was actually updated.
Assignee | ||
Comment 8•9 years ago
|
||
Bug 1168084 - Persist view source tab options. r=mconley
Attachment #8613710 -
Flags: review?(mconley)
Comment 9•9 years ago
|
||
Comment on attachment 8613710 [details] MozReview Request: Bug 1168084 - Persist view source tab options. r=mconley https://reviewboard.mozilla.org/r/9407/#review8597 Looks good! Thanks jryans!
Attachment #8613710 -
Flags: review?(mconley) → review+
Assignee | ||
Updated•9 years ago
|
Attachment #8610929 -
Flags: review?(mconley)
Assignee | ||
Comment 10•9 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=c8ff425fe04e
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 11•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/8ff42f8c288c
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/8ff42f8c288c
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Assignee | ||
Comment 13•9 years ago
|
||
Attachment #8610929 -
Attachment is obsolete: true
Updated•9 years ago
|
QA Whiteboard: [good first verify]
Comment 14•9 years ago
|
||
I have reproduced this bug in Nightly 41.0a1(Build ID: 20150525030205)(Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:41.0) Gecko/20100101 Firefox/41.0) with instruction from comment 0 Verified as fixed now on latest nightly Edition 43.0a1 (Build ID: 20150901030226) Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:43.0) Gecko/20100101 Firefox/43.0 [Bugday-20150902]
QA Whiteboard: [good first verify] → [good first verify] [Bugday-20150902]
Whiteboard: [Bugday-20150902]
Comment 15•9 years ago
|
||
Verified as fixed on beta 41.0b6 (Build ID: 20150831172306) Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:41.0) Gecko/20100101 Firefox/41.0
Status: RESOLVED → VERIFIED
Comment 16•9 years ago
|
||
I have reproduced this bug in Nightly 41.0a1 ( Build ID 20150525030205) Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0 Verified as fixed on beta 41.0b6 (Build ID 20150831172306) Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0 [Bugday-20150902]
You need to log in
before you can comment on or make changes to this bug.
Description
•