[CSS Regions] Minor fixes in regions performance tests
[WebKit-https.git] / PerformanceTests / Layout / resources / regions.js
index 508f5af95f5169de7580872b5ab06a04045a5f05..44f820d3391d976f10d595af489e28e4ec9f8d2f 100644 (file)
         };
     }
 
-    function performSelection(paragraphCount) {
-        var paragraphs = document.getElementsByClassName("contentParagraph");
-        var selection = getSelection();
-
-        selection.collapse(paragraphs[0], 0);
-
-        for (var i = 1; i < paragraphCount; i++)
-            selection.extend(paragraphs[i], 0);
-    }
-
-    function createRegionsSelectionTest(regionCount) {
-        var article = createArticle(regionCount, 1);
-        article.className = "articleInFlow";
-        var regions = createRegions("600px", "auto", regionCount, "auto");
-        document.body.appendChild(article);
-        document.body.appendChild(regions);
-        return {
-            description: "Testing selection with " + regionCount + " regions. Select text from first region to last one passing through all the regions.",
-            run: function() {
-                performSelection(regionCount);
-            },
-            setup: function() {
-                window.getSelection().removeAllRanges();
-            },
-            done: function() {
-                document.body.removeChild(article);
-                document.body.removeChild(regions);
-                templateParagraph = null;
-                templateRegion = null;
-            }
-        };
-    }
-
     function createMixedContent(regionCount) {
         var container = document.createElement("div");
         for (var i = 0; i < regionCount; ++i) {
     }
 
     window.createRegionsTest = createRegionsTest;
-    window.createRegionsSelectionTest = createRegionsSelectionTest;
     window.createArticle = createArticle;
+    window.createRegions = createRegions;
     window.createMixedContent = createMixedContent;
 
 })();