Closed Bug 683897 Opened 14 years ago Closed 14 years ago

Failure in /testSecurity/testSafeBrowsingWarningPages.js | could not validate element ID: urlbar with value

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: remus.pop, Assigned: whimboo)

References

()

Details

(Whiteboard: [mozmill-test-failure])

Attachments

(3 files, 1 obsolete file)

4. Include the test function, error message, date when the error occurred, date with the error first occurred, number of times the error has been reported, and the branches it occurs in the DESCRIPTION field EXAMPLE: TEST: /testSecurity/testSafeBrowsingWarningPages.js:testWarningPages ERROR: could not validate element ID: urlbar with value http://www.mozilla.com/firefox/its-a-trap.html WHEN: 2011-08-31 FIRST: 2011-08-25 FREQ: BRANCHES: release, 1.9.2 5. Remove these instructions 6. Click SUBMIT BUG ----- END INSTRUCTIONS ----- TEST: ERROR: WHEN: FIRST: FREQ:
Sorry about forgetting to remove the lines from the template. Basically the problem with this failure is that we get a redirect at a point in the test so I've come up with a workaround, hard-coding the urls.
Attachment #557492 - Flags: review?(vlad.mozbugs)
Can you please specify where we redirect to? Means source and target URL. Thanks. assertURLEqual is able to handle that. So not sure what's wrong here.
When finally visiting http://www.mozilla.com/firefox/its-a-trap.html in checkIgnoreWarningButton function, a screen appears in which we click the "ignore warning" button. After that we are redirected to http://www.mozilla.org/firefox/its-a-trap.html and when we assert it with the given parameter in checkIgnoreWarningButton we receive the error mentioned in comment 1. We could have used the controller.assertValue but I thought utils was more appropiate because we use it in another function. Yes, the behavior is strange because the test in the default branch works fine and it is almost the same code; differences appear in setting preferences as far as I can remember.
A Pivotal Tracker story has been created for this Bug: https://www.pivotaltracker.com/story/show/17795857
Comment on attachment 557492 [details] [diff] [review] proposed fix (1.9.2) > >+ // When accesing one of the pages we get a redirect so here is a workaround Please XXX: this comment because it's a temporary workaround Also, re-word to // XXX: Workaround // We dispose of the redirected url when accessing the page >+ if (url == "http://www.mozilla.com/firefox/its-a-trap.html") >+ url = "http://www.mozilla.org/firefox/its-a-trap.html"; >+ else >+ if (url == "http://www.mozilla.com/firefox/its-an-attack.html") >+ url = "http://www.mozilla.org/firefox/its-an-attack.html"; Please declare url values as constants. You can you two constant to show exaclty what you want to do: example INITIAL_URL and REDIRECT_URL. Provide other naming if you like, only make sure it's readable. > > /** > * Map test functions to litmus tests > */ > // testWarningPages.meta = {litmusids : [9014]}; We don't map to the litmus tests anymore so you can delete the above code This applies to every test we update/fix/create Otherwise looks good. Good catch with the redirected url
Attachment #557492 - Flags: review?(vlad.mozbugs) → review-
(In reply to Remus Pop from comment #3) > When finally visiting http://www.mozilla.com/firefox/its-a-trap.html in > checkIgnoreWarningButton function, a screen appears in which we click the > "ignore warning" button. After that we are redirected to > http://www.mozilla.org/firefox/its-a-trap.html and when we assert it with > the given parameter in checkIgnoreWarningButton we receive the error > mentioned in comment 1. When we are clicking an element we are not getting redirected. It's an expected page load in this case. So please add some sleep calls for debugging purposes and exactly watch what this test is doing and why we are failing. Also which line is it exactly? Given the error I don't think it's the assertURLEqual call in this case.
Somehow the merge from beta to release wasn't complete. I missed to change a single line which is now responsible for this failure. Patch upcoming. The upcoming patch will fix both the warning pages and notification bar test, but not the issue reported on bug 681920.
Assignee: remus.pop → hskupin
Attached patch Patch (mozmill-release) (obsolete) — Splinter Review
Fixes the issue on mozilla-release. I will check for the backport later.
Attachment #558055 - Flags: review?(anthony.s.hughes)
Attachment #558055 - Flags: review?(anthony.s.hughes) → review+
Patch was missing commit message -- here is an updated patch which has been checked in.
Attachment #558055 - Attachment is obsolete: true
Attachment #558952 - Flags: review+
Comment on attachment 558952 [details] [diff] [review] Patch v2 (mozilla-release) [checked-in] Landed: http://hg.mozilla.org/qa/mozmill-tests/rev/3a73dc57e7dc (mozilla-release)
Attachment #558952 - Attachment description: Patch v2 (mozmill-release) → Patch v2 (mozilla-release) [checked-in]
Ok, so the permanent redirect from .com to .org is hitting us here. When you click the ignore button we will be redirected to the .org domain and the notification bar closes immediately. The ignore permission doesn't get saved that way and reopening the fraudulent page shows us again the page with the ignore button. So lets directly check for the .org page to be loaded. Does the safebrowsing notification bar test also fail? If yes, it would need the same fix.
Attachment #558977 - Flags: review?(anthony.s.hughes)
Comment on attachment 558977 [details] [diff] [review] Backport (1.9.2) v1 [checked-in] > // Verify the warning button is not visible and the location bar displays the correct url >- var locationBar = new elementslib.ID(controller.window.document, "urlbar"); >- >- controller.assertValue(locationBar, url); >+ // Since we permanently redirect all .com addresses to .org we have to directly check >+ // for the .org URL. Otherwise we are stuck on the fraudulent page. This is only necessary >+ // for Firefox 5.x and lower because those builds don't set the permissions for the page. >+ utils.assertLoadedUrlEqual(controller, url.replace(/\.com/, ".org")); > controller.assertNodeNotExist(ignoreWarningButton); > controller.assertNode(new elementslib.ID(controller.tabs.activeTab, "main-feature")); > } My concern here is that your '// Since' comment might bleed into the '// Verify' comment above. I would suggest adding 'XXX: ' to the beginning of your comment. I won't block check-in on this however.
Attachment #558977 - Flags: review?(anthony.s.hughes) → review+
Keywords: checkin-needed
Attachment #558977 - Attachment description: Backport (1.9.2) v1 → Backport (1.9.2) v1 [checked-in]
Marking as resolved fixed. This test shouldn't fail now anymore across branches.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
No failure instances found in recent reports; VERIFIED FIXED
Status: RESOLVED → VERIFIED
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: