Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / PerformanceTests / Interactive / CopyAll.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../resources/runner.js"></script>
5 <script>
6
7 function startTest() {
8     var iframe = document.querySelector('iframe');
9     if (!iframe.contentDocument.queryCommandSupported('Copy')) {
10         alert('execCommand("copy") is not supported.');
11         if (window.testRunner)
12             testRunner.notifyDone();
13         return;
14     }
15
16     PerfTestRunner.measureTime({
17         unit: 'ms',
18         setup: function () {
19             document.querySelector('iframe').contentDocument.execCommand('SelectAll');
20         },
21         run: function () {
22             document.querySelector('iframe').contentDocument.execCommand('Copy');
23         },
24         done: function () {
25             document.querySelector('iframe').parentNode.removeChild(iframe);
26         }
27     });
28 }
29
30 </script>
31 <iframe src="../Parser/resources/html5.html" onload="startTest()" width="800" height="600">
32 </body>
33 </html>