mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
Bug 1675173 - [marionette] Disable TestPageLoadStrategy.test_none when actors are disabled. r=marionette-reviewers,jgraham
It's not worth the time to fix this particular bug in the old framescript code that will go away early next year. Differential Revision: https://phabricator.services.mozilla.com/D98565
This commit is contained in:
parent
b0c6d152de
commit
cd755e66cb
@ -15,6 +15,7 @@ from .marionette_test import (
|
||||
skip,
|
||||
skip_if_chrome,
|
||||
skip_if_desktop,
|
||||
skip_if_framescript,
|
||||
SkipTest,
|
||||
skip_unless_browser_pref,
|
||||
skip_unless_protocol,
|
||||
|
@ -17,6 +17,7 @@ from .decorators import (
|
||||
run_if_manage_instance,
|
||||
skip_if_chrome,
|
||||
skip_if_desktop,
|
||||
skip_if_framescript,
|
||||
skip_unless_browser_pref,
|
||||
skip_unless_protocol,
|
||||
with_parameters,
|
||||
|
@ -102,6 +102,24 @@ def skip_if_desktop(reason):
|
||||
return decorator
|
||||
|
||||
|
||||
def skip_if_framescript(reason):
|
||||
"""Decorator which skips a test if the framescript implementation is used."""
|
||||
|
||||
def decorator(test_item):
|
||||
if not isinstance(test_item, types.FunctionType):
|
||||
raise Exception("Decorator only supported for functions")
|
||||
|
||||
@functools.wraps(test_item)
|
||||
def skip_wrapper(self, *args, **kwargs):
|
||||
if self.marionette.get_pref("marionette.actors.enabled") is False:
|
||||
raise SkipTest(reason)
|
||||
return test_item(self, *args, **kwargs)
|
||||
|
||||
return skip_wrapper
|
||||
|
||||
return decorator
|
||||
|
||||
|
||||
def skip_unless_browser_pref(reason, pref, predicate=bool):
|
||||
"""Decorator which skips a test based on the value of a browser preference.
|
||||
|
||||
|
@ -15,6 +15,7 @@ from marionette_driver.marionette import Alert
|
||||
from marionette_harness import (
|
||||
MarionetteTestCase,
|
||||
run_if_manage_instance,
|
||||
skip_if_framescript,
|
||||
skip_unless_browser_pref,
|
||||
WindowManagerMixin,
|
||||
)
|
||||
@ -885,6 +886,7 @@ class TestPageLoadStrategy(BaseNavigationTestCase):
|
||||
|
||||
super(TestPageLoadStrategy, self).tearDown()
|
||||
|
||||
@skip_if_framescript("Bug 1675173: Won't be fixed for framescript mode")
|
||||
def test_none(self):
|
||||
self.marionette.delete_session()
|
||||
self.marionette.start_session({"pageLoadStrategy": "none"})
|
||||
|
Loading…
Reference in New Issue
Block a user