Closed Bug 1175266 Opened 5 years ago Closed 5 years ago

browser_trackingUI.js fails when running locally

Categories

(Firefox :: General, defect, P1)

40 Branch
defect

Tracking

()

RESOLVED FIXED
Firefox 41
Iteration:
41.3 - Jun 29
Tracking Status
firefox41 --- fixed

People

(Reporter: bgrins, Assigned: bgrins)

References

Details

(Whiteboard: [fxprivacy])

Attachments

(1 file, 1 obsolete file)

STR:

./mach test browser/base/content/test/general/browser_trackingUI.js

Expected: It passes
Actual: It fails with the following message:

25 INFO TEST-UNEXPECTED-FAIL | browser/base/content/test/general/browser_trackingUI.js | Uncaught exception - at chrome://mochitests/content/browser/browser/base/content/test/general/browser_trackingUI.js:76 - TypeError: PopupNotifications.panel.firstChild.disableTrackingContentProtection is not a function
Stack trace:
    testTrackingPage@chrome://mochitests/content/browser/browser/base/content/test/general/browser_trackingUI.js:76:3
    @chrome://mochitests/content/browser/browser/base/content/test/general/browser_trackingUI.js:130:1
    Tester_execTest@chrome://mochikit/content/browser-test.js:741:9
    Tester.prototype.nextTest</<@chrome://mochikit/content/browser-test.js:664:7
    SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:746:59
    Tester_execTest@chrome://mochikit/content/browser-test.js:741:9
    Tester.prototype.nextTest</<@chrome://mochikit/content/browser-test.js:664:7
    SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:746:59
SUITE-END | took 6s

This should pass locally so we can make changes to the feature / test.
Flags: firefox-backlog?
Flags: firefox-backlog? → firefox-backlog+
Whiteboard: [fxprivacy]
Priority: -- → P1
Blocks: 1175239
Attached patch browser-trackingUI.patch (obsolete) — Splinter Review
Needed to wait for the binding to be attached after showing the popup before proceeding in the test.  Not sure why it was only triggered locally, seems like a timing issue.
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Attachment #8623271 - Flags: review?(MattN+bmo)
Attachment #8623271 - Flags: review?(MattN+bmo) → review+
Just added a minor change I discussed with Matt - switched:

isnot(PopupNotifications.panel.firstChild.isTrackingContentBlocked, 0)

to

is(PopupNotifications.panel.firstChild.isTrackingContentBlocked,
   Ci.nsIWebProgressListener.STATE_BLOCKED_TRACKING_CONTENT)

which is actually a better assertion - this was passing locally even when the binding wasn't added and it should have been failing, since isTrackingContentBlocked was undefined which !== 0.
Attachment #8623271 - Attachment is obsolete: true
Attachment #8623333 - Flags: review+
remote:   https://hg.mozilla.org/integration/fx-team/rev/6258419da1af
Whiteboard: [fxprivacy] → [fixed-in-fx-team][fxprivacy]
Hi Brian, should this bug be marked as qe‑verify '+' or '-' for verification?
Flags: qe-verify?
Flags: needinfo?(bgrinstead)
Rank: 3
qe- since it's a test-only change.
Flags: qe-verify?
Flags: qe-verify-
Flags: needinfo?(bgrinstead)
Blocks: 1175549
https://hg.mozilla.org/mozilla-central/rev/6258419da1af
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team][fxprivacy] → [fxprivacy]
Target Milestone: --- → Firefox 41
Iteration: --- → 41.3 - Jun 29
You need to log in before you can comment on or make changes to this bug.