Closed
Bug 823547
Opened 12 years ago
Closed 12 years ago
Store the snippets version along with the snippets
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 22
People
(Reporter: mak, Assigned: mak)
References
Details
(Whiteboard: [about-home])
Attachments
(1 file)
7.29 KB,
patch
|
adw
:
review+
|
Details | Diff | Splinter Review |
On snippets version bump, if we fail to cache the new snippets, we fallback to the cached ones, that are an old unsupported version.
We should store the version along with the snippets, so that we clear the cache if it's outdated.
Assignee | ||
Updated•12 years ago
|
Whiteboard: [about-home]
Assignee | ||
Comment 1•12 years ago
|
||
While writing tests for this, I found the current browser_aboutHome.js test wrongly relies on bug 790934, or better, it relies on the fact we set the attributes twice!
I'm trying to fix it.
Assignee | ||
Comment 2•12 years ago
|
||
applies on top of the patch bug 820834.
When we bump the snippets version, this ensures we don't try to reuse a cached old version.
Unfortunately it's not 100% safe due to https://bugzilla.mozilla.org/show_bug.cgi?id=820834#c16 but that case should not be hit by final users (their browser should never ask for a future version).
Attachment #713640 -
Flags: review?(gavin.sharp)
Comment 3•12 years ago
|
||
Comment on attachment 713640 [details] [diff] [review]
patch v1.0
Hoping Drew can help with review here.
Attachment #713640 -
Flags: review?(gavin.sharp) → review?(adw)
Comment 4•12 years ago
|
||
Comment on attachment 713640 [details] [diff] [review]
patch v1.0
Review of attachment 713640 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/base/content/test/browser_aboutHome.js
@@ +171,5 @@
> +
> + let snippetsElt = doc.getElementById("snippets");
> + ok(snippetsElt, "Found snippets element");
> + is(snippetsElt.getElementsByTagName("span").length, 1,
> + "A default snippet is visible.");
"Visible" sounds like the wrong word, since this doesn't actually check the span's visibility. "Present"?
@@ +194,5 @@
> + let doc = gBrowser.selectedTab.linkedBrowser.contentDocument;
> +
> + let snippetsElt = doc.getElementById("snippets");
> + ok(snippetsElt, "Found snippets element");
> + is(snippetsElt.innerHTML, "test", "Cached snippet is visible.");
Here too.
Attachment #713640 -
Flags: review?(adw) → review+
Assignee | ||
Comment 5•12 years ago
|
||
Target Milestone: --- → Firefox 22
Assignee | ||
Comment 6•12 years ago
|
||
backed out for bc failures
https://hg.mozilla.org/integration/mozilla-inbound/rev/4bccbdd03dea
Assignee | ||
Comment 7•12 years ago
|
||
Comment 8•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•