Closed
Bug 917223
Opened 12 years ago
Closed 12 years ago
[Marionette JS Test] support including some header.js in test case
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 805838
People
(Reporter: aknow, Unassigned)
Details
When developing marionette webapi tests, I found that some of the test_file may share a set of duplicate code. Is it possible to extract them into a header.js so that we could include it in each test case.
Ex: telephony related test cases.
We may have many scenarios.
(1) dial a call => answer => hangup
(2) dial a call => answer => hold => resume => hangup
...
We would like to keep the different scenarios in different files. However, even they share some basic building block (dial / answer, hold, resume, reject, hangup), we still have to repeat those code in every files.
For xpcshelltest, we have the feature of head and tail to apply some operations before and after the test script.
After some study, it seems that the same feature is not on marionette test. But I found in the code, it will prepend head.js for 'browser_'. So, could we also extend this feature to other 'test_*.js' case.
We could introduce a special label like the following in the test script to enable the including.
MARIONETTE_JS_HEADER = head.js
I am not sure which mailing list should I go for the discussion. So I raise a bug here.
Flags: needinfo?(jgriffin)
Comment 1•12 years ago
|
||
I think this is a duplicate of bug 805838
| Reporter | ||
Comment 2•12 years ago
|
||
Yes, it's a duplicate.
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: needinfo?(jgriffin)
Resolution: --- → DUPLICATE
Updated•3 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•