[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

arv at chromium.org arv at chromium.org
Wed Dec 22 13:53:41 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ef3fc2292ef9fbdbc27f9088dadeb2713c3e615a
Author: arv at chromium.org <arv at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 28 22:52:23 2010 +0000

    2010-09-28  Erik Arvidsson  <arv at chromium.org>
    
            Reviewed by Ojan Vafai.
    
            Fix perf/class-list-remove test
            https://bugs.webkit.org/show_bug.cgi?id=46745
    
            Make sure we precompute the className in the setup functions and that
            we reset it before calling classList.remove.
    
            * perf/class-list-remove.html:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68596 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d9cb5fd..6e26336 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-09-28  Erik Arvidsson  <arv at chromium.org>
+
+        Reviewed by Ojan Vafai.
+
+        Fix perf/class-list-remove test
+        https://bugs.webkit.org/show_bug.cgi?id=46745
+
+        Make sure we precompute the className in the setup functions and that
+        we reset it before calling classList.remove.
+
+        * perf/class-list-remove.html:
+
 2010-09-28  Stephen White  <senorblanco at chromium.org>
 
         Unreviewed; new test baselines.
diff --git a/LayoutTests/perf/class-list-remove.html b/LayoutTests/perf/class-list-remove.html
index f03e9ba..0e31d93 100644
--- a/LayoutTests/perf/class-list-remove.html
+++ b/LayoutTests/perf/class-list-remove.html
@@ -1,20 +1,15 @@
 <script src="../resources/magnitude-perf.js"></script>
 <script>
 
-var element, s;
+var element, className, classToRemove;
 
 // Test 1 tests that remove is linear when there are N class names.
 
 function setupFunction1(magnitude)
 {
-    s = 'b';
     element = document.createElement('div');
-    element.className = Array(magnitude).join('a ') + s;
-}
-
-function test1(magnitude)
-{
-    element.classList.remove(s);
+    classToRemove = 'b';
+    className = Array(magnitude).join('a ') + classToRemove;
 }
 
 // Test 2 tests that remove is linear when the length of the class name is N.
@@ -22,18 +17,19 @@ function test1(magnitude)
 function setupFunction2(magnitude)
 {
     element = document.createElement('div');
+    classToRemove = Array(magnitude + 1).join('a');
+    className = classToRemove;
 }
 
-function test2(magnitude)
+function test(magnitude)
 {
-    var s = Array(magnitude + 1).join('a');
-    element.className = s;
+    element.className = className;
     element.classList.remove(s);
 }
 
 Magnitude.description('Tests that classList remove is linear.');
-Magnitude.run(setupFunction1, test1, Magnitude.LINEAR);
-Magnitude.run(setupFunction2, test2, Magnitude.LINEAR);
+Magnitude.run(setupFunction1, test, Magnitude.LINEAR);
+Magnitude.run(setupFunction2, test, Magnitude.LINEAR);
 
 </script>
 </body>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list