Bug 1200973 - Remove unneeded app cache code from Marionette; r=jgriffin

--HG--
extra : commitid : Dp3kNOM1zkn
extra : rebase_source : 51284534f8ce437ab9e69e00a91fc92da46bae4f
extra : histedit_source : 6f5f30baa51b19577eb1a298b5b6a87bf599683c
This commit is contained in:
David Burns 2015-09-04 21:49:39 +01:00
Родитель 6f800ab99a
Коммит f6bcf02594
5 изменённых файлов: 1 добавлений и 67 удалений

Просмотреть файл

@ -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)

Просмотреть файл

@ -117,7 +117,6 @@ b2g = false
[test_window_handles.py]
b2g = false
[test_appcache.py]
[test_screenshot.py]
[test_cookies.py]
b2g = false

Просмотреть файл

@ -8,7 +8,7 @@ __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

Просмотреть файл

@ -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")

Просмотреть файл

@ -13,7 +13,6 @@ 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
@ -1766,10 +1765,6 @@ class Marionette(object):
"""
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.