mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02:00
Tests: Import some structuredClone-related WPT tests
This commit is contained in:
committed by
Shannon Booth
parent
5eb4c3dc2f
commit
306c7b8211
Notes:
github-actions[bot]
2025-05-08 14:13:16 +00:00
Author: https://github.com/kennethmyhra Commit: https://github.com/LadybirdBrowser/ladybird/commit/306c7b8211a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4596 Reviewed-by: https://github.com/shannonbooth ✅
@@ -0,0 +1,18 @@
|
||||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>structuredClone() tests</title>
|
||||
<script>
|
||||
self.GLOBAL = {
|
||||
isWindow: function() { return true; },
|
||||
isWorker: function() { return false; },
|
||||
isShadowRealm: function() { return false; },
|
||||
};
|
||||
</script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../common/sab.js"></script>
|
||||
<script src="../../../html/webappapis/structured-clone/structured-clone-battery-of-tests.js"></script>
|
||||
<script src="../../../html/webappapis/structured-clone/structured-clone-battery-of-tests-with-transferables.js"></script>
|
||||
<script src="../../../html/webappapis/structured-clone/structured-clone-battery-of-tests-harness.js"></script>
|
||||
<div id=log></div>
|
||||
<script src="../../../html/webappapis/structured-clone/structured-clone.any.js"></script>
|
||||
@@ -0,0 +1,14 @@
|
||||
// META: title=structuredClone() tests
|
||||
// META: script=/common/sab.js
|
||||
// META: script=/html/webappapis/structured-clone/structured-clone-battery-of-tests.js
|
||||
// META: script=/html/webappapis/structured-clone/structured-clone-battery-of-tests-with-transferables.js
|
||||
// META: script=/html/webappapis/structured-clone/structured-clone-battery-of-tests-harness.js
|
||||
|
||||
runStructuredCloneBatteryOfTests({
|
||||
structuredClone: (obj, transfer) => {
|
||||
return new Promise(resolve => {
|
||||
resolve(self.structuredClone(obj, { transfer }));
|
||||
});
|
||||
},
|
||||
hasDocument: typeof document !== "undefined",
|
||||
});
|
||||
Reference in New Issue
Block a user