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:
Henrik Skupin 2020-12-03 12:20:20 +00:00
parent b0c6d152de
commit cd755e66cb
4 changed files with 22 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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