Closed Bug 669728 Opened 10 years ago Closed 10 years ago
Caller Frame should not call String .match on a filename (test Undo Tab From Context Menu .js)
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.
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]
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+
Landed as: http://hg.mozilla.org/qa/mozmill-tests/rev/01f08c17e829 (default) http://hg.mozilla.org/qa/mozmill-tests/rev/d277bfbda5a8 (aurora) http://hg.mozilla.org/qa/mozmill-tests/rev/94ffc9a64ffd (beta) http://hg.mozilla.org/qa/mozmill-tests/rev/70b2dcbf7a5a (release) I will come up with a follow-up for the API refactoring repo.
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+
Landed on API refactoring repo: https://github.com/geoelectric/mozmill-api-refactor/commit/57f7fe588d3e74413d86d28d6d8425b0394694ec
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
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]
You need to log in before you can comment on or make changes to this bug.