blob: 170cdf9fcaff668161c92022a5ea8b1563219194 [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ experimental: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>