All tests should be within the mozilla.org domain if not local

RESOLVED FIXED

Status

Mozilla QA
Mozmill Tests
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: ashughes, Assigned: ashughes)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Assignee)

Description

7 years ago
We don't have the capability to have all of our tests to use local test data at this point.  For tests where we cannot have local test data yet, we should at least be using test data within the mozilla.org domain.

With this bug, I will convert all tests which are using external content to use content within the mozilla.org domain.
(Assignee)

Comment 1

7 years ago
Rolling this into a task of the Local Data II project.
Blocks: 604708, 611061

Updated

7 years ago
Blocks: 611047
(Assignee)

Comment 2

7 years ago
Created attachment 489903 [details] [diff] [review]
Patch v1 (default)

Here is my initial patch for default branch.  The following are some things to note while reviewing the patch:

    // Use the web page search box to submit information
   controller.type(searchbox, "mozilla");
-  controller.keypress(searchbox, "VK_RETURN", {});
+  var goButton = new elementslib.ID(controller.tabs.activeTab, "submit");
+  controller.click(goButton);

For whatever reason, pressing enter on the searchbox in content does not work for this page. Instead, I'm submitting the query by clicking the page's Go button in content.

   // Get the message text
   var message = utils.getProperty("chrome://pipnss/locale/security.properties",
-                                  "PostToInsecureFromInsecureMessage");
+                                  "PostToInsecureFromSecureMessage");

The message displayed for this test page is InsecureFromSecure not InsecureFromInsecure.  This test before was using an insecure testpage, now we use a secure test page.  The purpose of this test is to conduct an insecure search and we still do that.  If we really want to use InsecureFromInsecure I'll have to use a different test page, but I believe this is good enough.

-  // Verify the "Alert me whenever" checkbox is checked by default
-  var checkbox = new elementslib.ID(controller.window.document, "checkbox");
-  controller.assertChecked(checkbox);
-

Removed this as the message we are verifying does not have a checkbox on it anymore.
Assignee: nobody → anthony.s.hughes
Status: NEW → ASSIGNED
Attachment #489903 - Flags: review?(aaron.train)
(Assignee)

Comment 3

7 years ago
Another quick note on this patch.  There are still a few pages which don't use internal sites:

testAutoCompleteOff.js: http://www.google.com/webhp?complete=1&hl=en
testRemoveAllCookies.js: http://www.google.com
testGoogleSuggestions.js: https://encrypted.google.com/
testPreferredLanguage.js: http://www.google.com/
testUnknownIssuer.js: https://mur.at

Henrik, perhaps you can give me feedback on whether we can use *.mozilla.org sites for these cases.
Comment on attachment 489903 [details] [diff] [review]
Patch v1 (default)

(In reply to comment #2)
> Created attachment 489903 [details] [diff] [review]
> Patch v1 (default)
> 
> Here is my initial patch for default branch.  The following are some things to
> note while reviewing the patch:
> 
>     // Use the web page search box to submit information
>    controller.type(searchbox, "mozilla");
> -  controller.keypress(searchbox, "VK_RETURN", {});
> +  var goButton = new elementslib.ID(controller.tabs.activeTab, "submit");
> +  controller.click(goButton);
> 
> For whatever reason, pressing enter on the searchbox in content does not work
> for this page. Instead, I'm submitting the query by clicking the page's Go
> button in content.

I raised the same issue in 611047. I think a followup should be filed to look into keypress. As for the patch, looks fine, r+. 

Nit: Should move the goButton declaration above the type() in that code block

>diff --git a/firefox/testSecurity/testSubmitUnencryptedInfoWarning.js b/firefox/testSecurity/testSubmitUnencryptedInfoWarning.js
>--- a/firefox/testSecurity/testSubmitUnencryptedInfoWarning.js
>+++ b/firefox/testSecurity/testSubmitUnencryptedInfoWarning.js
>@@ -73,26 +73,27 @@ var testSubmitUnencryptedInfoWarning = f
> 
>   // Use the web page search box to submit information
>   controller.type(searchbox, "mozilla");
>-  controller.keypress(searchbox, "VK_RETURN", {});
>+  var goButton = new elementslib.ID(controller.tabs.activeTab, "submit");
>+  controller.click(goButton);
Attachment #489903 - Flags: review?(aaron.train) → review+
(Assignee)

Comment 5

7 years ago
Comment on attachment 489903 [details] [diff] [review]
Patch v1 (default)

Henrik, can you conduct a followup review of this patch, and also provide feedback on comment 3?

Thanks.
Attachment #489903 - Flags: review?(hskupin)
(In reply to comment #3)
> testAutoCompleteOff.js: http://www.google.com/webhp?complete=1&hl=en
> testRemoveAllCookies.js: http://www.google.com
> testGoogleSuggestions.js: https://encrypted.google.com/
> testPreferredLanguage.js: http://www.google.com/
> testUnknownIssuer.js: https://mur.at

We shouldn't take care of the http pages. For testGoogleSuggestions it's intended because we have to circumvent the instant search. We also can't do anything for mur.at for now.

> Henrik, perhaps you can give me feedback on whether we can use *.mozilla.org
> sites for these cases.

This discussion should be part of another bug / discussion.
(Assignee)

Comment 7

7 years ago
> > Henrik, perhaps you can give me feedback on whether we can use *.mozilla.org
> > sites for these cases.
> 
> This discussion should be part of another bug / discussion.

Ok, I'll file a bug on that once this one is resolved.  Any feedback on the attached patch?
Comment on attachment 489903 [details] [diff] [review]
Patch v1 (default)

>+++ b/firefox/testSecurity/testSubmitUnencryptedInfoWarning.js
> 
>   // Load an unencrypted page
>-  controller.open("http://www.verisign.com");
>+  controller.open("https://mail.mozilla.org/listinfo/");

Simply use the domain without the listinfo path.

>   controller.type(searchbox, "mozilla");
>-  controller.keypress(searchbox, "VK_RETURN", {});
>+  var goButton = new elementslib.ID(controller.tabs.activeTab, "submit");
>+  controller.click(goButton);

nit: A blank line between type and the gobutton instantiation will improve the readability.

With that r=me.
Attachment #489903 - Flags: review?(hskupin) → review+
(Assignee)

Comment 9

7 years ago
Created attachment 489945 [details] [diff] [review]
Patch v1.1 (default)

Patch with nits address which will be checked in
(Assignee)

Comment 10

7 years ago
(In reply to comment #9)
> Created attachment 489945 [details] [diff] [review]
> Patch v1.1 (default)
> 
> Patch with nits address which will be checked in

Landed on default:
http://hg.mozilla.org/qa/mozmill-tests/rev/d6eece357b1f
(Assignee)

Comment 11

7 years ago
Created attachment 489955 [details] [diff] [review]
Patch v1.1 (mozilla1.9.2)

The branches are a bit different.  For example, we have testSecurityInfoViaMoreInformationButton.js on default-only and we have testSecurityInfoViaPadlock.js on branch-only.

Asking review in case I missed something, but otherwise this should be the same as Patch v1.1 (default).
Attachment #489955 - Flags: review?(aaron.train)

Updated

7 years ago
Attachment #489955 - Flags: review?(aaron.train) → review+
(Assignee)

Comment 12

7 years ago
(In reply to comment #11)
> Created attachment 489955 [details] [diff] [review]
> Patch v1.1 (mozilla1.9.2)

Landed:
http://hg.mozilla.org/qa/mozmill-tests/rev/9b9c179f7bba [mozilla1.9.2]
http://hg.mozilla.org/qa/mozmill-tests/rev/2535ebf2dac2 [mozilla1.9.1]
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Move of Mozmill Test related project bugs to newly created components. You can
filter out those emails by using "Mozmill-Tests-to-MozillaQA" as criteria.
Component: Mozmill Tests → Mozmill Tests
Product: Testing → Mozilla QA

Updated

7 years ago
Blocks: 615592
You need to log in before you can comment on or make changes to this bug.