blob: 67ded187dd28f328a7b048cc68ef4e2485222745 [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<meta name="viewport" content="initial-scale=5, width=device-width">
<head>
<script src="../../resources/ui-helper.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
let write = (message) => output.innerHTML += (message + "<br>");
function runTest()
{
var blob = this.response;
const textFile = new File(['This is a text file'], 'TextFile.txt', {type:'text/html'});
document.getElementById("target").addEventListener("click", () => {
navigator.share({text: "This is a text file", files: [textFile]}).then((result) => {
write("PASS: Share sheet invoked.");
testRunner.notifyDone();
});
});
UIHelper.activateAt(50, 50);
}
</script>
<style>
#target {
height: 100px;
width: 100px;
background-color: silver;
}
</style>
</head>
<body onload="runTest()">
<pre id="output"></pre>
<button id="target">
</button>
</body>
</html>