forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCopyAll.html
More file actions
33 lines (30 loc) · 917 Bytes
/
CopyAll.html
File metadata and controls
33 lines (30 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html>
<body>
<script src="../resources/runner.js"></script>
<script>
function startTest() {
var iframe = document.querySelector('iframe');
if (!iframe.contentDocument.queryCommandSupported('Copy')) {
alert('execCommand("copy") is not supported.');
if (window.testRunner)
testRunner.notifyDone();
return;
}
PerfTestRunner.measureTime({
unit: 'ms',
setup: function () {
document.querySelector('iframe').contentDocument.execCommand('SelectAll');
},
run: function () {
document.querySelector('iframe').contentDocument.execCommand('Copy');
},
done: function () {
document.querySelector('iframe').parentNode.removeChild(iframe);
}
});
}
</script>
<iframe src="../Parser/resources/html5.html" onload="startTest()" width="800" height="600">
</body>
</html>