Bug 1200973 - Remove unneeded app cache code from Marionette; r=jgriffin
authorDavid Burns <dburns@mozilla.com>
Fri, 04 Sep 2015 21:49:39 +0100
changeset 294382 c558ee35c092ea9ac8f7b01937143d4681403f64
parent 294381 3a5f6d92197239ad6c58b6c0e57b0324921a425a
child 294383 e8057795e5888731f830d0ba0428b095b71d110c
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgriffin
bugs1200973
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1200973 - Remove unneeded app cache code from Marionette; r=jgriffin
testing/marionette/client/marionette/tests/unit/test_appcache.py
testing/marionette/client/marionette/tests/unit/unit-tests.ini
testing/marionette/driver/marionette_driver/__init__.py
testing/marionette/driver/marionette_driver/application_cache.py
testing/marionette/driver/marionette_driver/marionette.py
deleted file mode 100644
--- a/testing/marionette/client/marionette/tests/unit/test_appcache.py
+++ /dev/null
@@ -1,31 +0,0 @@
-#Copyright 2007-2009 WebDriver committers
-#Copyright 2007-2009 Google Inc.
-#
-#Licensed under the Apache License, Version 2.0 (the "License");
-#you may not use this file except in compliance with the License.
-#You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-#Unless required by applicable law or agreed to in writing, software
-#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 marionette_driver.application_cache import ApplicationCache
-from marionette import MarionetteTestCase
-
-
-class AppCacheTests(MarionetteTestCase):
-
-    def testWeCanGetTheStatusOfTheAppCache(self):
-        test_url = self.marionette.absolute_url('html5Page')
-        self.marionette.navigate(test_url)
-        app_cache = self.marionette.application_cache
-
-        status = app_cache.status
-        while status == ApplicationCache.DOWNLOADING:
-            status = app_cache.status
-
-        self.assertEquals(ApplicationCache.UNCACHED, app_cache.status)
--- a/testing/marionette/client/marionette/tests/unit/unit-tests.ini
+++ b/testing/marionette/client/marionette/tests/unit/unit-tests.ini
@@ -112,17 +112,16 @@ b2g = false
 b2g = false
 [test_window_management.py]
 b2g = false
 [test_window_position.py]
 b2g = false
 [test_window_handles.py]
 b2g = false
 
-[test_appcache.py]
 [test_screenshot.py]
 [test_cookies.py]
 b2g = false
 [test_window_title.py]
 [test_window_type.py]
 b2g = false
 [test_implicit_waits.py]
 [test_wait.py]
--- a/testing/marionette/driver/marionette_driver/__init__.py
+++ b/testing/marionette/driver/marionette_driver/__init__.py
@@ -3,14 +3,14 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 
 __version__ = '0.13'
 
 
 from marionette_driver import ( errors, by, decorators, expected, geckoinstance,
                                 gestures, keys, marionette, selection, wait,
-                                application_cache, date_time_value )
+                                date_time_value )
 from marionette_driver.by import By
 from marionette_driver.date_time_value import DateTimeValue
 from marionette_driver.gestures import smooth_scroll, pinch
 from marionette_driver.wait import Wait
 from marionette_driver.marionette import Actions
deleted file mode 100644
--- a/testing/marionette/driver/marionette_driver/application_cache.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 2015 Mozilla Foundation
-# Copyright 2011 Software Freedom Conservancy.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# 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.
-
-class ApplicationCache(object):
-    UNCACHED = 0
-    IDLE = 1
-    CHECKING = 2
-    DOWNLOADING = 3
-    UPDATE_READY = 4
-    OBSOLETE = 5
-
-    def __init__(self, driver):
-        self.driver = driver
-
-    @property
-    def status(self):
-        return self.driver._send_message("getAppCacheStatus", key="value")
--- a/testing/marionette/driver/marionette_driver/marionette.py
+++ b/testing/marionette/driver/marionette_driver/marionette.py
@@ -8,17 +8,16 @@ import json
 import os
 import socket
 import StringIO
 import traceback
 import warnings
 
 from contextlib import contextmanager
 
-from application_cache import ApplicationCache
 from decorators import do_crash_check
 from keys import Keys
 from marionette_transport import MarionetteTransport
 
 from mozrunner import B2GEmulatorRunner
 
 import geckoinstance
 import errors
@@ -1761,20 +1760,16 @@ class Marionette(object):
 
         This is the equivalent of calling `document.cookie` and
         parsing the result.
 
         :returns: A list of cookies for the current domain.
         """
         return self._send_message("getCookies", key="value" if self.protocol == 1 else None)
 
-    @property
-    def application_cache(self):
-        return ApplicationCache(self)
-
     def screenshot(self, element=None, highlights=None, format="base64",
                    full=True):
         """Takes a screenshot of a web element or the current frame.
 
         The screen capture is returned as a lossless PNG image encoded
         as a base 64 string by default. If the `element` argument is defined the
         capture area will be limited to the bounding box of that
         element.  Otherwise, the capture area will be the bounding box