Closed
Bug 495137
Opened 15 years ago
Closed 15 years ago
Add platform members (isLinux, isMac, isWindows) to mozmill class
Categories
(Testing Graveyard :: Mozmill, defect)
Testing Graveyard
Mozmill
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: whimboo, Assigned: adam.christian)
References
Details
(Whiteboard: [mozmill-doc-needed][verified-mozmill-1.2])
It would be great to have simple class members like isLinux, isMac, and isWindows to check on which operating systems we are running the test.
It should look like my test is it doing now:
https://bug494071.bugzilla.mozilla.org/attachment.cgi?id=379977
Comment 1•15 years ago
|
||
There already is a platform string that you can use for that. You can just do a simple string comparison instead of calling a function.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Reporter | ||
Comment 2•15 years ago
|
||
Mikeal, no function will be called. During initialization of Mozmill you can create class members which will be true/false. From now on we even wouldn't have to do a string comparison anymore which will save us time. Think about having Mozmill run on directories with hundreds of tests where we need those checks.
Further it makes it more style friendly and you will have a better overview, e.g.:
controller.keypress(null, "k", {metaKey: mozmill.isMac, ctrlKey: !mozmill.isMac});
vs
controller.keypress(null, "k", {metaKey: (mozmill.platform == "darwin"), ctrlKey: !(mozmill.platform == "darwin")});
Reporter | ||
Comment 3•15 years ago
|
||
Mikeal?
Reporter | ||
Comment 4•15 years ago
|
||
After talking to Mikeal on IRC we clarified my needs and it is on the list for Mozmill 1.2. Reopening for the upcoming work.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Whiteboard: [mozmill-1.2]
Assignee | ||
Comment 5•15 years ago
|
||
Committed revision 472.
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 6•15 years ago
|
||
Adam, why not simplifying it like:
> var isMac = (platform == "darwin");
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 7•15 years ago
|
||
Simply cranking things out in a rush, if you are that adamant about the implementation feel free to patch.
Reporter | ||
Comment 8•15 years ago
|
||
Alright. That would make more work. Lets push it for a later refactoring. I'll check it right now. Thanks Adam.
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 9•15 years ago
|
||
Works great. I'll update existing tests.
Assignee: nobody → adam.christian
Blocks: 493226
Status: RESOLVED → VERIFIED
Whiteboard: [mozmill-1.2] → [verified-mozmill-1.2]
Reporter | ||
Updated•15 years ago
|
Whiteboard: [verified-mozmill-1.2] → [mozmill-doc-needed][verified-mozmill-1.2]
Updated•8 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•