GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit 3f122e5f authored by Alex Catarineu's avatar Alex Catarineu

Bug 40008: Adapt dom-objects-enumeration test for 82

parent 71bce126
...@@ -8,7 +8,7 @@ class Test(testsuite.TorBrowserTest): ...@@ -8,7 +8,7 @@ class Test(testsuite.TorBrowserTest):
self.marionette.set_pref("network.proxy.allow_hijacking_localhost", False) 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.test_page_file_url = self.marionette.absolute_url("dom-objects-enumeration.html?testType=worker")
self.expectedObjects = [ self.expectedObjects = {
"AbortController", "AbortController",
"AbortSignal", "AbortSignal",
"addEventListener", "addEventListener",
...@@ -195,14 +195,12 @@ class Test(testsuite.TorBrowserTest): ...@@ -195,14 +195,12 @@ class Test(testsuite.TorBrowserTest):
"XMLHttpRequest", "XMLHttpRequest",
"XMLHttpRequestEventTarget", "XMLHttpRequestEventTarget",
"XMLHttpRequestUpload", "XMLHttpRequestUpload",
] }
self.expectedObjects80 = self.expectedObjects + ["AggregateError", "FinalizationRegistry", "WeakRef"]
self.expectedObjects80.sort()
def test_dom_objects_enumeration_workers(self): def test_dom_objects_enumeration_workers(self):
expectedObjects = self.expectedObjects expectedObjects = self.expectedObjects
if self.get_version() >= 80: if self.get_version() >= 80:
expectedObjects = self.expectedObjects80 expectedObjects = expectedObjects.union({"AggregateError", "FinalizationRegistry", "WeakRef"})
with self.marionette.using_context('content'): with self.marionette.using_context('content'):
self.marionette.navigate(self.test_page_file_url) self.marionette.navigate(self.test_page_file_url)
......
...@@ -12,7 +12,7 @@ class Test(testsuite.TorBrowserTest): ...@@ -12,7 +12,7 @@ class Test(testsuite.TorBrowserTest):
self.marionette.set_pref("network.proxy.allow_hijacking_localhost", False) 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") self.test_page_file_url = self.marionette.absolute_url("dom-objects-enumeration.html?testType=window")
# The list of expected DOM objects # The list of expected DOM objects
self.expectedObjects = [ self.expectedObjects = {
"AbortController", "AbortController",
"AbortSignal", "AbortSignal",
"AbstractRange", "AbstractRange",
...@@ -749,15 +749,15 @@ class Test(testsuite.TorBrowserTest): ...@@ -749,15 +749,15 @@ class Test(testsuite.TorBrowserTest):
"XPathExpression", "XPathExpression",
"XPathResult", "XPathResult",
"XSLTProcessor", "XSLTProcessor",
] }
self.expectedObjects80 = self.expectedObjects + ["AggregateError", "FinalizationRegistry", "WeakRef"]
self.expectedObjects80.remove("content")
self.expectedObjects80.sort()
def test_dom_objects_enumeration(self): def test_dom_objects_enumeration(self):
expectedObjects = self.expectedObjects expectedObjects = self.expectedObjects
if self.get_version() >= 80: 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'): with self.marionette.using_context('content'):
self.marionette.navigate(self.test_page_file_url) self.marionette.navigate(self.test_page_file_url)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment