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)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 23

People

(Reporter: nalexander, Assigned: nalexander)

References

Details

Attachments

(1 file)

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.
Assignee: nobody → nalexander
Blocks: 866271
Status: NEW → ASSIGNED
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+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed in services]
Target Milestone: --- → Firefox 23
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)
(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)
Nick, Oh, so robocop_head.js is used *instead* of head.js? If that's so, then sure, we're good here.
(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.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: