commit 3f122e5fa7d7f8cd11230805de1b45c8dc4f06df Author: Alex Catarineu acat@torproject.org Date: Thu Oct 22 21:18:56 2020 +0200
Bug 40008: Adapt dom-objects-enumeration test for 82 --- .../tor_browser_tests/test_dom-objects-enumeration-worker.py | 8 +++----- marionette/tor_browser_tests/test_dom-objects-enumeration.py | 12 ++++++------ 2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/marionette/tor_browser_tests/test_dom-objects-enumeration-worker.py b/marionette/tor_browser_tests/test_dom-objects-enumeration-worker.py index 5d21d1b..e03cdad 100644 --- a/marionette/tor_browser_tests/test_dom-objects-enumeration-worker.py +++ b/marionette/tor_browser_tests/test_dom-objects-enumeration-worker.py @@ -8,7 +8,7 @@ class Test(testsuite.TorBrowserTest): self.marionette.set_pref("network.proxy.allow_hijacking_localhost", False) self.test_page_file_url = self.marionette.absolute_url("dom-objects-enumeration.html?testType=worker")
- self.expectedObjects = [ + self.expectedObjects = { "AbortController", "AbortSignal", "addEventListener", @@ -195,14 +195,12 @@ class Test(testsuite.TorBrowserTest): "XMLHttpRequest", "XMLHttpRequestEventTarget", "XMLHttpRequestUpload", - ] - self.expectedObjects80 = self.expectedObjects + ["AggregateError", "FinalizationRegistry", "WeakRef"] - self.expectedObjects80.sort() + }
def test_dom_objects_enumeration_workers(self): expectedObjects = self.expectedObjects if self.get_version() >= 80: - expectedObjects = self.expectedObjects80 + expectedObjects = expectedObjects.union({"AggregateError", "FinalizationRegistry", "WeakRef"})
with self.marionette.using_context('content'): self.marionette.navigate(self.test_page_file_url) diff --git a/marionette/tor_browser_tests/test_dom-objects-enumeration.py b/marionette/tor_browser_tests/test_dom-objects-enumeration.py index 143a554..cdc2a1e 100644 --- a/marionette/tor_browser_tests/test_dom-objects-enumeration.py +++ b/marionette/tor_browser_tests/test_dom-objects-enumeration.py @@ -12,7 +12,7 @@ class Test(testsuite.TorBrowserTest): self.marionette.set_pref("network.proxy.allow_hijacking_localhost", False) self.test_page_file_url = self.marionette.absolute_url("dom-objects-enumeration.html?testType=window") # The list of expected DOM objects - self.expectedObjects = [ + self.expectedObjects = { "AbortController", "AbortSignal", "AbstractRange", @@ -749,15 +749,15 @@ class Test(testsuite.TorBrowserTest): "XPathExpression", "XPathResult", "XSLTProcessor", - ] - self.expectedObjects80 = self.expectedObjects + ["AggregateError", "FinalizationRegistry", "WeakRef"] - self.expectedObjects80.remove("content") - self.expectedObjects80.sort() + }
def test_dom_objects_enumeration(self): expectedObjects = self.expectedObjects if self.get_version() >= 80: - expectedObjects = self.expectedObjects80 + expectedObjects = expectedObjects.union({"AggregateError", "FinalizationRegistry", "WeakRef"}) + expectedObjects.remove("content") + if self.get_version() >= 82: + expectedObjects = expectedObjects.union({"MediaMetadata","MediaSession","Sanitizer"})
with self.marionette.using_context('content'): self.marionette.navigate(self.test_page_file_url)