Status

()

Firefox for Android
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: gbrown, Assigned: gbrown)

Tracking

unspecified
Firefox 23
x86
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Assignee)

Description

5 years ago
I want to cleanup the source code for Robocop tests -- make code formatting more uniform, etc.
(Assignee)

Comment 1

5 years ago
Created attachment 717248 [details] [diff] [review]
indentation and file permissions

As a start, this replaces tabs with 4 space indents and removes execute permission from a few files.
Assignee: nobody → gbrown
Attachment #717248 - Flags: review?(jmaher)
Comment on attachment 717248 [details] [diff] [review]
indentation and file permissions

Review of attachment 717248 [details] [diff] [review]:
-----------------------------------------------------------------

thanks!

::: mobile/android/base/tests/testFormHistory.java.in
@@ +31,5 @@
>          Context context = (Context)getActivity();
>          ContentResolver cr = context.getContentResolver();
>          ContentValues[] cvs = new ContentValues[1];
>          cvs[0] = new ContentValues();
>    

nit, extra whitespace

@@ +102,1 @@
>    

nit, extra whitespace

::: mobile/android/base/tests/testPan.java.in
@@ +46,5 @@
>          int frames = mDriver.stopFrameRecording();
>          mAsserter.dumpLog("__start_report" + Integer.toString(frames) + "__end_report");
>          long msecs = System.currentTimeMillis();
>          mAsserter.dumpLog("__startTimestamp" + msecs + "__endTimestamp");
> +    }   

nit, extra whitespace
Attachment #717248 - Flags: review?(jmaher) → review+
(Assignee)

Updated

5 years ago
Whiteboard: [leave open]
(Assignee)

Comment 5

5 years ago
Created attachment 718956 [details] [diff] [review]
more indentation and spacing corrections; also consistent bracketing

Found some more!
Attachment #718956 - Flags: review?(jmaher)
Comment on attachment 718956 [details] [diff] [review]
more indentation and spacing corrections; also consistent bracketing

Review of attachment 718956 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for this.  I catch 9/10 simple style things, but there are always a few that sneak by!
Attachment #718956 - Flags: review?(jmaher) → review+
(Assignee)

Comment 9

5 years ago
Created attachment 735952 [details] [diff] [review]
use blockForGeckoReady in testAwesomebarSwipes

I noticed testAwesomebarSwipes does not use blockForGeckoReady. Simply waiting for Gecko:Ready can lead to test failures (the event may be sent before the test starts).

While I was editing this, I noticed that the header comment was completely wrong -- wrote a new one.
Attachment #735952 - Flags: review?(jmaher)
Comment on attachment 735952 [details] [diff] [review]
use blockForGeckoReady in testAwesomebarSwipes

Review of attachment 735952 [details] [diff] [review]:
-----------------------------------------------------------------

thanks, nice and simple.
Attachment #735952 - Flags: review?(jmaher) → review+
(Assignee)

Comment 13

5 years ago
Created attachment 739817 [details] [diff] [review]
specify charset in some rc test files

A few robocop html files do not specify the character encoding. afaik, this does not contribute to any test failures, but it does cause a warning seen in test logs:

[JavaScript Warning: "A form was submitted in the windows-1252 encoding which cannot encode all Unicode characters, so user input may get corrupted. To avoid this problem, the page should be changed so that the form is submitted in the UTF-8 encoding either by changing the encoding of the page itself to UTF-8 or by specifying accept-charset=utf-8 on the form element." {file: "http://mochi.test:8888/tests/robocop/robocop_login.html" line: 6}]

This patch specifies the charset as utf-8 in these files.
Attachment #739817 - Flags: review?(jmaher)
Comment on attachment 739817 [details] [diff] [review]
specify charset in some rc test files

Review of attachment 739817 [details] [diff] [review]:
-----------------------------------------------------------------

robocop will be an industry leader compared to all the other test suites we have!
Attachment #739817 - Flags: review?(jmaher) → review+
(Assignee)

Comment 17

5 years ago
I was going to use this bug for landing additional cleanup / restructuring patches, but others are taking up the cause now (bug 910791, etc).
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [leave open]
Target Milestone: --- → Firefox 23
You need to log in before you can comment on or make changes to this bug.