forked from mirrors/gecko-dev
Backed out 4 changesets (bug 1522790) - backout the remaining changesets. CLOSED TREE
Backed out changeset f8d941b403d0 (bug 1522790) Backed out changeset 251e04906ebf (bug 1522790) Backed out changeset 3acba738b962 (bug 1522790) Backed out changeset 9e98e314a251 (bug 1522790)
This commit is contained in:
parent
632821fc9d
commit
5237c3ea58
16 changed files with 115 additions and 49 deletions
|
|
@ -12,8 +12,8 @@
|
|||
expected:
|
||||
if not fission and (os == "linux") and not debug and asan: [PASS, FAIL]
|
||||
if not fission and (os == "android"): FAIL
|
||||
if fission: FAIL
|
||||
FAIL
|
||||
if fission: PASS
|
||||
[FAIL, PASS]
|
||||
|
||||
[rcap units respond to changes]
|
||||
expected: FAIL
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
[font-face-003.html]
|
||||
[@font-face from document applies to :host]
|
||||
expected:
|
||||
if os == "android": FAIL
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
[font-face-004.html]
|
||||
[@font-face from document applies to a slotted element]
|
||||
expected:
|
||||
if (os == "linux") and asan and not fission: [PASS, FAIL]
|
||||
if os == "android": FAIL
|
||||
|
|
@ -4,4 +4,3 @@
|
|||
if not fission and debug and swgl: [PASS, FAIL]
|
||||
if not fission and debug and not swgl: [FAIL, PASS]
|
||||
if not fission and not debug: [PASS, FAIL]
|
||||
FAIL
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
[event-handler-onmove-02.tentative.html]
|
||||
expected: TIMEOUT
|
||||
expected: ERROR
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
[setinterval-cross-realm-callback-report-exception.html]
|
||||
[window.setInterval() reports the exception from its callback in the callback's global object]
|
||||
expected:
|
||||
if (os == "linux") and fission and tsan: [PASS, FAIL]
|
||||
if (os == "linux") and not fission: [PASS, FAIL]
|
||||
if (os == "android") and swgl: [PASS, FAIL]
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
[settimeout-cross-realm-callback-report-exception.html]
|
||||
[window.setTimeout() reports the exception from its callback in the callback's global object]
|
||||
expected:
|
||||
if (os == "linux") and not debug and asan and fission: [PASS, FAIL]
|
||||
if (os == "linux") and not debug and asan and not fission: [PASS, FAIL]
|
||||
if (os == "linux") and debug and not fission: [PASS, FAIL]
|
||||
if (os == "linux") and not debug and not asan: [PASS, FAIL]
|
||||
|
|
@ -4,4 +4,3 @@
|
|||
if (os == "linux") and not fission and not debug: [PASS, FAIL]
|
||||
if (os == "linux") and not fission and debug: [PASS, FAIL]
|
||||
if os == "android": FAIL
|
||||
FAIL
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
[crash_content_process.py]
|
||||
disabled:
|
||||
if asan or tsan: Crash Reporter not enabled.
|
||||
if os == "android": https://bugzilla.mozilla.org/show_bug.cgi?id=1848850
|
||||
expected: CRASH
|
||||
if (os == "android"): https://bugzilla.mozilla.org/show_bug.cgi?id=1848850
|
||||
|
||||
expected:
|
||||
CRASH
|
||||
|
||||
[test_detect_crash[capabilities0\]]
|
||||
bug: 1848850
|
||||
expected:
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
</style>
|
||||
<div id="host"><span id="in-document">1234567890</span></div>
|
||||
<script>
|
||||
promise_test(async function () {
|
||||
test(function() {
|
||||
host.attachShadow({ mode: "open" }).innerHTML = `
|
||||
<style>
|
||||
:host {
|
||||
|
|
@ -24,7 +24,6 @@
|
|||
<span id="in-shadow">0123456789</span>
|
||||
`;
|
||||
|
||||
await document.fonts.ready;
|
||||
assert_equals(document.getElementById('in-document').offsetWidth, 160);
|
||||
assert_equals(host.shadowRoot.getElementById('in-shadow').offsetWidth, 160);
|
||||
}, "@font-face from document applies to :host");
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
</style>
|
||||
<div id="host"><span id="in-document">1234567890</span></div>
|
||||
<script>
|
||||
promise_test(async function() {
|
||||
test(function() {
|
||||
host.attachShadow({ mode: "open" }).innerHTML = `
|
||||
<style>
|
||||
::slotted(#in-document) {
|
||||
|
|
@ -25,7 +25,6 @@ promise_test(async function() {
|
|||
<span id="in-shadow">0123456789</span>
|
||||
`;
|
||||
|
||||
await document.fonts.ready;
|
||||
assert_equals(document.getElementById('in-document').offsetWidth, 160);
|
||||
assert_not_equals(host.shadowRoot.getElementById('in-shadow').offsetWidth, 160);
|
||||
}, "@font-face from document applies to a slotted element");
|
||||
|
|
|
|||
|
|
@ -153,11 +153,7 @@
|
|||
await new Promise(resolve => t.step_timeout(resolve, 0));
|
||||
|
||||
const expected = isDisabledFormControl(element) ? expectedEvents : nonDisabledExpectedEvents;
|
||||
|
||||
t.step_wait_func_done(() => observedEvents.length > 0,
|
||||
() => assert_array_equals(observedEvents.map(e => e.type), expected, "Observed events"),
|
||||
undefined, 1000, 10);
|
||||
;
|
||||
assert_array_equals(observedEvents.map(e => e.type), expected, "Observed events");
|
||||
|
||||
for (const observed of observedEvents) {
|
||||
assert_equals(observed.target, target, `${observed.type}.target`)
|
||||
|
|
|
|||
|
|
@ -23,9 +23,10 @@ async_test(t => {
|
|||
`), 4);
|
||||
window.clearThisInterval = () => { frames[0].clearInterval(id); };
|
||||
|
||||
t.step_wait_func_done(() => onerrorCalls.length > 0,
|
||||
() => assert_array_equals(onerrorCalls, ["frame1"]),
|
||||
undefined, 1000, 10);
|
||||
t.step_timeout(() => {
|
||||
assert_array_equals(onerrorCalls, ["frame1"]);
|
||||
t.done();
|
||||
}, 8);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -19,9 +19,10 @@ async_test(t => {
|
|||
window.onload = t.step_func(() => {
|
||||
frames[0].setTimeout(new frames[1].Function(`throw new parent.frames[2].Error("PASS");`), 4);
|
||||
|
||||
t.step_wait_func_done(() => onerrorCalls.length > 0,
|
||||
() => assert_array_equals(onerrorCalls, ["frame1"]),
|
||||
undefined, 1000, 10);
|
||||
t.step_timeout(() => {
|
||||
assert_array_equals(onerrorCalls, ["frame1"]);
|
||||
t.done();
|
||||
}, 8);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -103,9 +103,6 @@ class MarionetteBaseProtocolPart(BaseProtocolPart):
|
|||
self.marionette.timeout.script = timeout
|
||||
self.timeout = timeout
|
||||
|
||||
def create_window(self, type="tab", **kwargs):
|
||||
return self.marionette.open(type=type, focus=True)["handle"]
|
||||
|
||||
@property
|
||||
def current_window(self):
|
||||
return self.marionette.current_window_handle
|
||||
|
|
@ -236,6 +233,57 @@ class MarionetteTestharnessProtocolPart(TestharnessProtocolPart):
|
|||
else:
|
||||
break
|
||||
|
||||
def get_test_window(self, window_id, parent, timeout=5):
|
||||
"""Find the test window amongst all the open windows.
|
||||
This is assumed to be either the named window or the one after the parent in the list of
|
||||
window handles
|
||||
|
||||
:param window_id: The DOM name of the Window
|
||||
:param parent: The handle of the runner window
|
||||
:param timeout: The time in seconds to wait for the window to appear. This is because in
|
||||
some implementations there's a race between calling window.open and the
|
||||
window being added to the list of WebDriver accessible windows."""
|
||||
test_window = None
|
||||
end_time = time.time() + timeout
|
||||
while time.time() < end_time:
|
||||
if window_id:
|
||||
try:
|
||||
# Try this, it's in Level 1 but nothing supports it yet
|
||||
win_s = self.parent.base.execute_script("return window['%s'];" % self.window_id)
|
||||
win_obj = json.loads(win_s)
|
||||
test_window = win_obj["window-fcc6-11e5-b4f8-330a88ab9d7f"]
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if test_window is None:
|
||||
handles = self.marionette.window_handles
|
||||
if len(handles) == 2:
|
||||
test_window = next(iter(set(handles) - {parent}))
|
||||
elif len(handles) > 2 and handles[0] == parent:
|
||||
# Hope the first one here is the test window
|
||||
test_window = handles[1]
|
||||
|
||||
if test_window is not None:
|
||||
assert test_window != parent
|
||||
return test_window
|
||||
|
||||
time.sleep(0.1)
|
||||
|
||||
raise Exception("unable to find test window")
|
||||
|
||||
def test_window_loaded(self):
|
||||
"""Wait until the page in the new window has been loaded.
|
||||
|
||||
Hereby ignore Javascript execptions that are thrown when
|
||||
the document has been unloaded due to a process change.
|
||||
"""
|
||||
while True:
|
||||
try:
|
||||
self.parent.base.execute_script(self.window_loaded_script, asynchronous=True)
|
||||
break
|
||||
except errors.JavascriptException:
|
||||
pass
|
||||
|
||||
|
||||
class MarionettePrefsProtocolPart(PrefsProtocolPart):
|
||||
def setup(self):
|
||||
|
|
@ -448,8 +496,7 @@ class MarionetteWindowProtocolPart(WindowProtocolPart):
|
|||
return self.marionette.minimize_window()
|
||||
|
||||
def set_rect(self, rect):
|
||||
self.marionette.set_window_rect(
|
||||
rect.get("x"), rect.get("y"), rect.get("height"), rect.get("width"))
|
||||
self.marionette.set_window_rect(rect["x"], rect["y"], rect["height"], rect["width"])
|
||||
|
||||
def get_rect(self):
|
||||
return self.marionette.window_rect
|
||||
|
|
@ -939,13 +986,16 @@ class MarionetteTestharnessExecutor(TestharnessExecutor):
|
|||
return (test.make_result(extra=extra, *data), [])
|
||||
|
||||
def do_testharness(self, protocol, url, timeout):
|
||||
protocol.testharness.close_old_windows(self.last_environment["protocol"])
|
||||
parent_window = protocol.testharness.close_old_windows(self.last_environment["protocol"])
|
||||
|
||||
if self.protocol.coverage.is_enabled:
|
||||
self.protocol.coverage.reset()
|
||||
|
||||
test_window = protocol.base.create_window()
|
||||
protocol.base.execute_script("window.open('about:blank', '%s', 'noopener')" % self.window_id)
|
||||
test_window = protocol.testharness.get_test_window(self.window_id, parent_window,
|
||||
timeout=10 * self.timeout_multiplier)
|
||||
self.protocol.base.set_window(test_window)
|
||||
protocol.testharness.test_window_loaded()
|
||||
|
||||
if self.debug_test and self.browser.supports_devtools:
|
||||
self.protocol.debug.load_devtools()
|
||||
|
|
@ -1009,6 +1059,8 @@ class MarionetteRefTestExecutor(RefTestExecutor):
|
|||
|
||||
self.install_extensions = browser.extensions
|
||||
|
||||
with open(os.path.join(here, "reftest.js")) as f:
|
||||
self.script = f.read()
|
||||
with open(os.path.join(here, "test-wait.js")) as f:
|
||||
self.wait_script = f.read() % {"classname": "reftest-wait"}
|
||||
|
||||
|
|
@ -1056,19 +1108,10 @@ class MarionetteRefTestExecutor(RefTestExecutor):
|
|||
self.has_window = False
|
||||
|
||||
if not self.has_window:
|
||||
self.protocol.base.create_window(type="window")
|
||||
# Resize the browser window so that its inner dimensions have
|
||||
# exactly a size of 800x600 pixels, which means ignoring all
|
||||
# visible toolbars and sidebars.
|
||||
offsets = self.protocol.marionette.execute_script("""
|
||||
return {
|
||||
width: window.outerWidth - window.innerWidth,
|
||||
height: window.outerHeight - window.innerHeight,
|
||||
};
|
||||
""")
|
||||
self.protocol.marionette.set_window_rect(
|
||||
x=0, y=0, width=800 + offsets["width"], height=600 + offsets["height"])
|
||||
self.protocol.base.execute_script(self.script)
|
||||
self.protocol.base.set_window(self.protocol.marionette.window_handles[-1])
|
||||
self.has_window = True
|
||||
self.protocol.testharness.test_window_loaded()
|
||||
|
||||
if self.protocol.coverage.is_enabled:
|
||||
self.protocol.coverage.reset()
|
||||
|
|
|
|||
|
|
@ -150,14 +150,6 @@ class BaseProtocolPart(ProtocolPart):
|
|||
:returns: True to re-run the test, or False to continue with the next test"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def create_window(self, type="tab", **kwargs):
|
||||
"""Return a handle identifying a freshly created top level browsing context
|
||||
|
||||
:param type: - Type hint, either "tab" or "window"
|
||||
:returns: A protocol-specific handle"""
|
||||
pass
|
||||
|
||||
@property
|
||||
def current_window(self):
|
||||
"""Return a handle identifying the current top level browsing context
|
||||
|
|
@ -210,6 +202,18 @@ class TestharnessProtocolPart(ProtocolPart):
|
|||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def get_test_window(self, window_id, parent):
|
||||
"""Get the window handle dorresponding to the window containing the
|
||||
currently active test.
|
||||
|
||||
:param window_id: A string containing the DOM name of the Window that
|
||||
contains the test, or None.
|
||||
:param parent: The handle of the runner window.
|
||||
:returns: A protocol-specific window handle.
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def test_window_loaded(self):
|
||||
"""Wait until the newly opened test window has been loaded."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue