blob: 5dc5de6e7cf72e285e58a415d4ab6db33fdde2e3 [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ AsyncClipboardAPIEnabled=true ] -->
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<script>
jsTestIsAsync = true;
addEventListener("load", async function() {
description("Verifies that the wrapper for Navigator's Clipboard remains consistent across GC passes. This test must be run using WebKitTestRunner.");
subframe = document.querySelector("iframe");
subframeNavigator = subframe.contentWindow.navigator;
subframeNavigator.clipboard.foo = "bar";
subframe.remove();
subframe = null;
if (window.GCController)
GCController.collect();
await new Promise(resolve => setTimeout(resolve, 50));
shouldBeEqualToString("subframeNavigator.clipboard.foo", "bar");
finishJSTest();
});
</script>
<body>
<iframe srcdoc="Hello world"></iframe>
</body>
</html>