Closed
Bug 870908
Opened 12 years ago
Closed 11 years ago
Add Robocop Java harness for writing tests in Javascript
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 23
People
(Reporter: nalexander, Assigned: nalexander)
References
Details
Attachments
(1 file)
(deleted),
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
A number of people have wanted to make it "easy to write Robocop tests", which has meant a number of things. Recent consumers include Bug 866271, Bug 870371, and Bug 855146; recent implementers include Bug 777451.
On Bug 866271, I got feedback (from gbrown, mfinkle, and rnewman) on an approach for running xpcshell style tests from Robocop. I've beefed that up and intend to land it as part of Bug 866271. I intend to post to mobile-firefox-dev about this approach, and I want a ticket to refer to. I will update this ticket when that post gets written.
Updated•12 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #748278 -
Flags: review?(rnewman)
Assignee | ||
Comment 2•12 years ago
|
||
Try build with functionality exercising this patch at:
https://tbpl.mozilla.org/?tree=Try&rev=1b77c88798f2
Assignee | ||
Comment 3•12 years ago
|
||
Mercurial 2.0.2 seems to have a Mac OS X filename case bug. Try
https://tbpl.mozilla.org/?tree=Try&rev=85dad1ab2455
Comment 4•12 years ago
|
||
Comment on attachment 748278 [details] [diff] [review]
Bug 870908 - Add Robocop Java harness for writing tests in Javascript. r=rnewman
Review of attachment 748278 [details] [diff] [review]:
-----------------------------------------------------------------
Pervasive nit: it's "JavaScript", not "Javascript".
::: mobile/android/base/tests/BaseTest.java.in
@@ +219,5 @@
> contentEventExpecter.unregisterListener();
> }
>
> + /**
> + * Load <code>url</code> using the awesome bar UI and sending key strokes.
Nit: "AwesomeBar".
::: mobile/android/base/tests/JavascriptTest.java.in
@@ +1,1 @@
> +#filter substitution
License.
@@ +114,5 @@
> + if (Log.isLoggable(LOGTAG, Log.VERBOSE))
> + Log.v(LOGTAG, "Waiting for Robocop:Status");
> + String data = expecter.blockForEventData();
> + if (Log.isLoggable(LOGTAG, Log.VERBOSE))
> + Log.v(LOGTAG, "Got Robocop:Status with data '" + data + "'");
This method seems like a great place to enforce the {} rule.
Attachment #748278 -
Flags: review?(rnewman) → review+
Comment 5•12 years ago
|
||
Whiteboard: [fixed in services]
Comment 6•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed in services]
Target Milestone: --- → Firefox 23
Comment 7•10 years ago
|
||
Nick:
Can you explain why you needed to change network.disable.ipc.security in this test?
http://hg.mozilla.org/mozilla-central/diff/9295291746ca/mobile/android/base/tests/robocop_head.js#l1.61
If this is running in xpcshell then the runxpcshell command should already have set network.disable.ipc.security for you.
I'm just trying to weed out invalid uses of the pref--generally code should not be setting it.
thanks.
Flags: needinfo?(nalexander)
Assignee | ||
Comment 8•10 years ago
|
||
(In reply to Jason Duell (:jduell) from comment #7)
> Nick:
>
> Can you explain why you needed to change network.disable.ipc.security in
> this test?
>
>
> http://hg.mozilla.org/mozilla-central/diff/9295291746ca/mobile/android/base/
> tests/robocop_head.js#l1.61
>
> If this is running in xpcshell then the runxpcshell command should already
> have set network.disable.ipc.security for you.
>
> I'm just trying to weed out invalid uses of the pref--generally code should
> not be setting it.
robocop_head.js is copy-pasta (I'm so sorry, but I couldn't deduce a better option at the time) straight from
http://hg.mozilla.org/mozilla-central/file/9295291746ca/testing/xpcshell/head.js#l55
So if that code has moved on, this should move on too. But it looks like it hasn't:
http://hg.mozilla.org/mozilla-central/annotate/f93c0ef45597/testing/xpcshell/head.js#l92
Flags: needinfo?(nalexander)
Comment 9•10 years ago
|
||
Nick,
Oh, so robocop_head.js is used *instead* of head.js? If that's so, then sure, we're good here.
Assignee | ||
Comment 10•10 years ago
|
||
(In reply to Jason Duell (:jduell) from comment #9)
> Nick,
>
> Oh, so robocop_head.js is used *instead* of head.js? If that's so, then
> sure, we're good here.
That's correct. I would have liked to have shared them, but it seemed complicated: Robocop doesn't fully participate in the regular testing infrastructure.
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•