Closed Bug 669728 Opened 14 years ago Closed 14 years ago

findCallerFrame should not call String.match on a filename (testUndoTabFromContextMenu.js)

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: whimboo, Assigned: whimboo)

References

()

Details

(Keywords: regression, Whiteboard: [lib][mozmill-test-failure])

Attachments

(2 files)

Module: testUndoTabFromContextMenu.js Test: testUndoTabFromContextMenu Failure: invalid quantifier Branches: ALL Platforms: ALL With the landing of the assertions module in our current shared module system, we introduced an orange failure. Not sure how to reproduce so far but looks like something is wrong with calling the findCallerFrame method.
Keywords: regression
A web search showed me that it is related to RegEx. I will dig into later.
Ok, so this only fails if the repository gets cloned to a temporary location on OS X, e.g. "/var/folders/ur/urRSHOmhFJOHFVCrfZAVW++++TI/-Tmp-/tmpfgdil4.mozmill-tests". Due to the contained special characters '+' and |-| it's not a valid regex and the call 'frame.filename.match(filename)' will fail. We should simply check if the filename is contained. No need to call match here.
Summary: Test failure 'invalid quantifier ' in testUndoTabFromContextMenu → findCallerFrame should not call String.match on a filename (testUndoTabFromContextMenu.js)
Whiteboard: [mozmill-test-failure] → [shared module][mozmill-test-failure]
Attached patch Patch v1Splinter Review
Attachment #545874 - Flags: review?(dave.hunt)
A Pivotal Tracker story has been created for this Bug: https://www.pivotaltracker.com/story/show/15762377
Comment on attachment 545874 [details] [diff] [review] Patch v1 Looks good.
Attachment #545874 - Flags: review?(dave.hunt) → review+
Attachment #545878 - Flags: review?(gmealer)
Comment on attachment 545878 [details] [diff] [review] Patch v1 (api refactor) r+, looks fine. I agree this was the most appropriate fix. For times when we really do want to inject a string into a regex, I filed Bug 671705.
Attachment #545878 - Flags: review?(gmealer) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Blocks: 639545
Component: Mozmill Tests → Mozmill Shared Modules
Component: Mozmill Shared Modules → Mozmill Tests
Whiteboard: [shared module][mozmill-test-failure] → [lib]
Whiteboard: [lib] → [lib][mozmill-test-failure]
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: