Closed Bug 1753860 Opened 2 years ago Closed 2 years ago

Test using structuredClone in xpcshell tests

Categories

(Core :: XPConnect, task)

task

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: mathew.hodson, Assigned: mathew.hodson)

References

Details

Attachments

(1 file)

I wanted to use structuredClone in browser/components/sessionstore/test/unit/test_shutdown_cleanup.js but I get an error.

ERROR Unexpected exception ReferenceError: structuredClone is not defined at C:/Users/Mathew/source/repos/mozilla-central/obj-x86_64-pc-mingw32/_tests/xpcshell/browser/components/sessionstore/test/unit/test_shutdown_cleanup.js:46
writeAndParse@C:/Users/Mathew/source/repos/mozilla-central/obj-x86_64-pc-mingw32/_tests/xpcshell/browser/components/sessionstore/test/unit/test_shutdown_cleanup.js:46:14
test_shistory_cap_none@C:/Users/Mathew/source/repos/mozilla-central/obj-x86_64-pc-mingw32/_tests/xpcshell/browser/components/sessionstore/test/unit/test_shutdown_cleanup.js:58:25
_do_main@c:\users\mathew\source\repos\mozilla-central\testing\xpcshell\head.js:240:6
_execute_test@c:\users\mathew\source\repos\mozilla-central\testing\xpcshell\head.js:604:5

Component: DOM: postMessage → XPCShell Harness
Product: Core → Testing

I figured out that it can be used by first calling Cu.importGlobalProperties(["structuredClone"]), but there aren't any uses in the tree currently, so I think we should add a test for this.

Type: enhancement → task
Component: XPCShell Harness → XPConnect
Depends on: 1734320
Product: Testing → Core
Assignee: nobody → mathew.hodson
Status: NEW → ASSIGNED
Summary: Allow structuredClone to be used in xpcshell tests → Test using structuredClone in xpcshell tests
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/ca668bf5c75e
Test using `structuredClone` in xpcshell. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: