Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / PerformanceTests / Layout / RegionsSelectAllMixedContent.html
1 <!DOCTYPE html>
2 <html>
3     <head>
4         <link rel="stylesheet" href="resources/regions.css" type="text/css"></link>
5         <script src="../resources/runner.js"></script>
6         <script src="resources/regions.js"></script>
7         <style type="text/css">
8         #log {
9             position: fixed;
10         }
11         </style>
12     </head>
13     <body>
14         <pre id="log"></pre>
15         <script>
16             function createRegionsSelectAllMixedContentTest(regionCount) {
17                 var article = createArticle(regionCount, 1);
18                 article.className = "articleInFlow";
19                 var container = createMixedContent(regionCount);
20                 document.body.appendChild(article);
21                 document.body.appendChild(container);
22                 return {
23                     description: "Testing selection with mixed content (" + regionCount + " regular paragraphs and " + regionCount + " regions). Select text using select all command.",
24                     run: function() {
25                         document.execCommand('SelectAll');
26                     },
27                     setup: function() {
28                         window.getSelection().removeAllRanges();
29                     },
30                     done: function() {
31                         document.body.removeChild(article);
32                         document.body.removeChild(container);
33                         templateParagraph = null;
34                         templateRegion = null;
35                     }
36                 };
37             }
38
39             PerfTestRunner.measureTime(createRegionsSelectAllMixedContentTest(1000));
40         </script>
41     </body>
42 </html>