// Test should not lose ownership.
clipboardTypes.forEach(function(otherType) {
losingOwnership = false;
if (aClipboardType != otherType && clipboard.isClipboardTypeSupported(otherType)) {
// Test setting clipboard data.
writeRandomStringToClipboard("text/plain", otherType);
ok(!losingOwnership, `Should not lose ownership while setting data to type ${otherType}`);
// Test async setting clipboard data.
writeRandomStringToClipboard("text/plain", otherType, null, true);
ok(!losingOwnership, `Should not lose ownership while async setting data to type ${otherType}`);
}
});
// Test whether should lose ownership.
losingOwnership = false;
writeRandomStringToClipboard("text/plain", aClipboardType, clipboardOwner);
ok(losingOwnership, `Should lose ownership while setting data to type ${aClipboardType}`);
losingOwnership = false;
writeRandomStringToClipboard("text/plain", aClipboardType, null, true);
ok(losingOwnership, `Should lose ownership while async setting data to type ${aClipboardType}`);
/** Test for Bug 1812078 */
clipboardTypes.forEach(function(testType) {
if (clipboard.isClipboardTypeSupported(testType)) {
// Test sync set clipboard data.
testClipboardOwner(testType, false);
// Test async set clipboard data.
testClipboardOwner(testType, true);
}
});
</script>
</body>
</html>
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.