Closed Bug 837772 Opened 13 years ago Closed 13 years ago

Work - Get mochitest-plain and mochitest-chrome running in Metro Firefox

Categories

(Firefox for Metro Graveyard :: General, defect)

All
Windows 8.1
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mbrubeck, Assigned: mbrubeck)

References

Details

(Whiteboard: feature=work)

Attachments

(1 file)

We currently have a way to run mochitest-browser-chrome tests for Metro Firefox (see bug 771271). We would also like to run "plain" and "chrome" mochitests too. This should help us test web-facing features, and let us share tests with Desktop Firefox and with Fennec.
The following command creates a tests.ini file in dist/bin and launches the Metro browser, but for some reason the command line from tests.ini doesn't seem to make it to the BrowserCLH command-line handler: $ pymake EXTRA_TEST_ARGS=--metro-immersive mochitest-plain
The code in nsBrowserApp that reads tests.ini is always dropping the last argument. For mochitest-browser-chrome the last argument is always "about:blank" so this doesn't matter, but for other suites it does.
Attached patch patchSplinter Review
Since the final argument is usually not followed by a space, we don't usually end up incrementing newArgc an extra time after reading it. The only time we need to decrement newArgc is if we stopped reading right after incrementing it. This loop is a bit tricky to read; maybe we can rewrite it as two nested loops?
Assignee: nobody → mbrubeck
Status: NEW → ASSIGNED
Attachment #716268 - Flags: review?(jmathies)
Comment on attachment 716268 [details] [diff] [review] patch (In reply to Matt Brubeck (:mbrubeck) from comment #4) > Created attachment 716268 [details] [diff] [review] > patch > > Since the final argument is usually not followed by a space, we don't > usually end up incrementing newArgc an extra time after reading it. The > only time we need to decrement newArgc is if we stopped reading right after > incrementing it. > > This loop is a bit tricky to read; maybe we can rewrite it as two nested > loops? I have no issues with this. Although with your fix if it works perfectly, .. iiibdfi?
Attachment #716268 - Flags: review?(jmathies) → review+
Another option is to have the system do the command line processing for us with CommandLineToArgvW [1] [1] http://msdn.microsoft.com/en-us/library/windows/desktop/bb776391%28v=vs.85%29.aspx
Hardware: x86_64 → All
Version: unspecified → Trunk
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Depends on: 850630
Blocks: 850630
No longer depends on: 850630
No longer blocks: metro-testing
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: