Closed
Bug 934678
Opened 12 years ago
Closed 12 years ago
Write test for Home.banner API
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 28
People
(Reporter: Margaret, Assigned: Margaret)
References
Details
Attachments
(1 file)
3.73 KB,
patch
|
wesj
:
review+
|
Details | Diff | Splinter Review |
Inspired by wesj's comment in bug 932830.
I'm thinking we could model this test after testPromptGridInput. We could load a chrome-privledged JS file that adds a home banner message, then open about:home and check to make sure the banner is shown.
Assignee | ||
Comment 1•12 years ago
|
||
This is pretty simple, but it gets the job done.
Here's a try push:
https://tbpl.mozilla.org/?tree=Try&rev=60e19162debe
Attachment #827118 -
Flags: review?(wjohnston)
Comment 2•12 years ago
|
||
Comment on attachment 827118 [details] [diff] [review]
patch
Review of attachment 827118 [details] [diff] [review]:
-----------------------------------------------------------------
Great!
::: mobile/android/base/tests/roboextender/robocop_home_banner.html
@@ +14,5 @@
> +const TEXT = "The quick brown fox jumps over the lazy dog.";
> +
> +function start() {
> + var test = location.hash.substring(1);
> + window[test]();
Since there's only one test in here, you could just call addMessage() directly.
Attachment #827118 -
Flags: review?(wjohnston) → review+
Assignee | ||
Comment 3•12 years ago
|
||
(In reply to Wesley Johnston (:wesj) from comment #2)
> ::: mobile/android/base/tests/roboextender/robocop_home_banner.html
> @@ +14,5 @@
> > +const TEXT = "The quick brown fox jumps over the lazy dog.";
> > +
> > +function start() {
> > + var test = location.hash.substring(1);
> > + window[test]();
>
> Since there's only one test in here, you could just call addMessage()
> directly.
I originally wanted to make a removeMessage method as well, but I didn't know the best way to store the message id, since the page would get reloaded. Maybe in a pref, since this is chrome-privileged? I'd also want to do a check in Java to make sure we *didn't* show the message, and I'm not sure of a better way than waiting for a waitForText to time out.
Assignee | ||
Comment 4•12 years ago
|
||
I decided to leave in the addMessage function bit, and filed bug 935264 about extending this to test Home.banner.remove().
https://hg.mozilla.org/integration/fx-team/rev/b79bb3ab6ca2
![]() |
||
Comment 5•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 28
Assignee | ||
Updated•12 years ago
|
Blocks: home-banner
Updated•5 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
•