Closed Bug 1071964 Opened 6 years ago Closed 6 years ago

openAndLoadSubDialog compares the injectedStylesheets against the owner document's stylesheets instead of the subdialog's stylesheets

Categories

(Firefox :: Preferences, defect)

defect
Not set
Points:
1

Tracking

()

RESOLVED FIXED
Firefox 35
Iteration:
35.2

People

(Reporter: jaws, Assigned: jaws)

References

Details

Attachments

(1 file)

If a stylesheet is added to the injectedStylesheet array but is not present in the preferences.xul file, the openAndLoadSubDialog() helper function will fail when making sure that all injected stylesheets are found.

This is because the function is currently looking at content.document.styleSheets, but it should instead be looking at content.gSubDialog._frame.contentDocument.styleSheets.
Flags: qe-verify-
Flags: in-testsuite+
Flags: firefox-backlog+
Attached patch PatchSplinter Review
Attachment #8494081 - Flags: review?(MattN+bmo)
Comment on attachment 8494081 [details] [diff] [review]
Patch

Review of attachment 8494081 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/components/preferences/in-content/tests/head.js
@@ +54,5 @@
>      is_element_visible(content.gSubDialog._overlay, "Overlay is visible");
>  
>      // Check that stylesheets were injected
>      let expectedStyleSheetURLs = content.gSubDialog._injectedStyleSheets.slice(0);
> +    for (let styleSheet of content.gSubDialog._frame.contentDocument.styleSheets) {

Since the frame is already loaded in this case (we're in the load listener) this should be fine. Thanks
Attachment #8494081 - Flags: review?(MattN+bmo) → review+
Iteration: 34.2 → 35.2
https://hg.mozilla.org/mozilla-central/rev/a3f673c67d31
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 35
You need to log in before you can comment on or make changes to this bug.