Closed Bug 1042100 Opened 10 years ago Closed 10 years ago

Write test for auto-adding 'default' widgets to current area placements even post-customization

Categories

(Firefox :: Toolbars and Customization, defect)

defect
Not set
normal
Points:
1

Tracking

()

RESOLVED FIXED
Firefox 34
Iteration:
34.1

People

(Reporter: Gijs, Assigned: Gijs)

References

Details

Attachments

(1 file)

From bug 1023304: (In reply to Blair McBride [:Unfocused] from bug 1023304 comment #18) > Though, I am worried about having no test coverage - not even manual > coverage. Can we not test this via calling APIs via BackstagePass, to > forcibly add a new builtin widget and then fake part of the initialization > step again by manually calling introduceNewBuiltinWidgets() and checking > gFuturePlacements (which is already tested)? It's not perfect, but it'd be > far better than nothing.
Flags: firefox-backlog+
OS: Mac OS X → All
Hardware: x86 → All
Status: NEW → ASSIGNED
QA Whiteboard: [qa?]
Hi Gijs, can you mark this bug as either [qa+] or [qa-] for verification.
Flags: needinfo?(gijskruitbosch+bugs)
QA Whiteboard: [qa?] → [qa-]
Flags: needinfo?(gijskruitbosch+bugs)
Like this?
Attachment #8461724 - Flags: review?(bmcbride)
Comment on attachment 8461724 [details] [diff] [review] add test for _introduceNewBuiltinWidgets, Review of attachment 8461724 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/components/customizableui/test/browser_1042100_default_placements_update.js @@ +48,5 @@ > + > + normalizedWidget = CustomizableUIInternal.normalizeWidget(testWidgetOld, > + CustomizableUI.SOURCE_BUILTIN); > + ok(normalizedWidget, "Widget should be normalizable"); > + if (!normalizedWidget) { Self-review-comment: This early return block should also delete testWidgetNew.id from gPalette.
Comment on attachment 8461724 [details] [diff] [review] add test for _introduceNewBuiltinWidgets, Review of attachment 8461724 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/components/customizableui/test/browser_1042100_default_placements_update.js @@ +9,5 @@ > + // Customize something to make sure stuff changed: > + CustomizableUI.addWidgetToArea("feed-button", CustomizableUI.AREA_NAVBAR); > + > + // Check what version we're on: > + let CustomizableUIBSPass = Cu.import("resource:///modules/CustomizableUI.jsm"); Nit: Import into dummy scope. ie: ... = Cu.import(..., {});
Attachment #8461724 - Flags: review?(bmcbride) → review+
Flags: in-testsuite+
Whiteboard: [fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: