Closed Bug 784013 Opened 7 years ago Closed 7 years ago

add application cache support

Categories

(Testing :: Marionette, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla19

People

(Reporter: automatedtester, Assigned: automatedtester)

Details

Attachments

(1 file, 1 obsolete file)

Selenium has just added application cache support so just aligning APIs
Attachment #653507 - Flags: review?(jgriffin)
Comment on attachment 653507 [details] [diff] [review]
adding appcache support and aligning with Selenium

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

html5Page.html refers to many files (.jpg and .js) which aren't present, including the page's manifest.  Is that important for the test?  (I'm not sure, since the only thing the test verifies is the UNCACHED state.)  If yes, we should include it and the files it references; if not, we can just use a simple dummy file rather than copying the Selenium version.

Also, new tests should be added to unit-tests.ini so that they get run by CI.

::: testing/marionette/client/marionette/application_cache.py
@@ +21,5 @@
> +    CHECKING = 2
> +    DOWNLOADING = 3
> +    UPDATE_READY = 4
> +    OBSOLETE = 5
> +    

trailing whitespace

::: testing/marionette/client/marionette/tests/unit/test_appcache.py
@@ +11,5 @@
> +#distributed under the License is distributed on an "AS IS" BASIS,
> +#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> +#See the License for the specific language governing permissions and
> +#limitations under the License.
> +from application_cache import ApplicationCache

Should have a newline between the license and imports.  Also, this is really a new test, not a copy of a Selenium one, so we should use an MPL header here.

@@ +27,5 @@
> +        while status == ApplicationCache.DOWNLOADING:
> +            status = app_cache.status
> +
> +        self.assertEquals(ApplicationCache.UNCACHED, app_cache.status)
> +        

trailing whitespace

@@ +36,5 @@
> +    def _loadSimplePage(self):
> +        self._loadPage("simpleTest")
> +
> +    def _loadPage(self, name):
> +        self.driver.get(self._pageURL(name))

There are three unused functions here which should be deleted; they're relevant to Selenium but not Marionette.
Attachment #653507 - Flags: review?(jgriffin) → review-
Attachment #653507 - Attachment is obsolete: true
Attachment #654813 - Flags: review?(jgriffin)
Comment on attachment 654813 [details] [diff] [review]
adding application cache helpers support to Marionette;

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

Thanks!
Attachment #654813 - Flags: review?(jgriffin) → review+
https://hg.mozilla.org/mozilla-central/rev/1bb0cd787de7
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Whiteboard: [automation-needed-in-aurora]
You need to log in before you can comment on or make changes to this bug.