Closed Bug 573582 Opened 14 years ago Closed 14 years ago

[mozmill] Failures in testSearch/testSearchSelection.js:testSearchSelectionViaContextMenu

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gmealer, Assigned: aaronmt)

References

()

Details

(Whiteboard: [mozmill-test-failure])

Attachments

(2 files, 1 obsolete file)

Error: Controller.assertJS("subject.URLContainsDomain == true")
Seen in WinXP, Win7, Mac
Geo, when you work on this bug please also move the external search to a local search. You can add the opensearch search from http://hg.mozilla.org/qa/litmus-data/file/tip/firefox/search to our repository and use that search engine. Further we will also need a local test page which some paragraphs like lorem ipsum.
Assignee: nobody → gmealer
Was investing this test failure and it's due to some random occurrence where a new tab (about:blank) is opened up alongside the searching tab (in background). It becomes the activeTab and is then compared against in checkSearchResultPage. 

Recent test failure from 06/23/10:

http://brasstacks.mozilla.com/couchdb/mozmill/_design/reports/_show/report/63a483947eda11dfbd2f005056a533eb
Attached patch Patch v1 - (default) (obsolete) — Splinter Review
So with 1.5.1 running the only test failure I see is the failure as identified in comment #0, and it is easier to fix at the moment. 

This test uses mozilla_mission as it's local-data file but searches online currently.

We are searching through selecting a word in a lengthy paragraph. With the coordinate clicking fix in bug 583604 that's on the 1.5.1 hot-fix branch, we are double clicking  in the centre of the paragraph which ends up selecting: 'tool's to', which in the search query URL, will be shown as: 'tools+to' and is failing checkSearchResultPage(); because of the whitespace -> + difference.

Work around is to either make checkSearchResultPage smarter, or just put in coordinates to pick a single word in the test. If I put the coordinates, 20, 10 in the doubleClick call, we search up 'Mozilla' which will work and pass the test.

For the moment, this patch will pass the test by using coordinates in the double click and select a single word.
Assignee: gmealer → aaron.train
Status: NEW → ASSIGNED
Attachment #484697 - Flags: review?(gmealer)
Testing this in 1.5.1, this also depends on bug 604832
Depends on: 604832
(In reply to comment #6)
> Testing this in 1.5.1, this also depends on bug 604832

The current patch in that bug with a change in testTabbedBrowsingAPI.js to selectedIndex which this test uses.
Assignee: aaron.train → nobody
Component: Search → Mozmill Tests
Product: Firefox → Testing
QA Contact: search → mozmilltests
Assignee: nobody → aaron.train
Hardware: x86 → All
Attachment #484697 - Attachment is obsolete: true
Attachment #484773 - Flags: review?(gmealer)
Attachment #484697 - Flags: review?(gmealer)
Comment on attachment 484773 [details] [diff] [review]
Patch v1 - (default) [coords 5,5]

LGTM
Attachment #484773 - Flags: review?(gmealer) → review+
Landed on default as http://hg.mozilla.org/qa/mozmill-tests/rev/8e7eb4910116
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
So you have decided against the usage of the selection API, as what we have discussed two days ago in the mozmill channel?
I'd have to check logs to get specifics, but Aaron said he was getting some sort of warning or error back using that API. We decided to go with the coordinates you suggested instead until we could investigate further.

I'm sure Aaron can amplify.
This present fix in the interim is also required on older branches as it's as well a reoccurring failure shown on the dashboard. If it's ok, I have attached a patch good for both branches, and will flag for review once indicated by Geo.
Attachment #487373 - Flags: review?(gmealer)
Comment on attachment 487373 [details] [diff] [review]
Patch v1 - (1.9.2/1.9.1) [coord 5,5]

Looks fine, please land.
Attachment #487373 - Flags: review?(gmealer) → review+
The selection error I was getting was a NS_ERROR_DOM_SECURITY_ERROR when using
createRange to get my starting and ending offsets of text.   |var range =
controller.window.document.createRange();|
Move of Mozmill Test related project bugs to newly created components. You can
filter out those emails by using "Mozmill-Tests-to-MozillaQA" as criteria.
Product: Testing → Mozilla QA
Version: Trunk → unspecified
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: