Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: LayoutTests/perf/class-list-remove.html

Issue 51383002: Delete perf tests that are WontFixed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: try again Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <script src="../resources/magnitude-perf.js"></script>
2 <script>
3
4 var element, className, classToRemove;
5
6 // Test 1 tests that remove is linear when there are N class names.
7
8 function setupFunction1(magnitude)
9 {
10 element = document.createElement('div');
11 classToRemove = 'b';
12 className = Array(magnitude).join('a ') + classToRemove;
13 }
14
15 // Test 2 tests that remove is linear when the length of the class name is N.
16
17 function setupFunction2(magnitude)
18 {
19 element = document.createElement('div');
20 classToRemove = Array(magnitude + 1).join('a');
21 className = classToRemove;
22 }
23
24 function test(magnitude)
25 {
26 element.className = className;
27 element.classList.remove(classToRemove);
28 }
29
30 Magnitude.description('Tests that classList remove is linear, ' +
31 'both in number of class names ' +
32 'and in length of class name.');
33 Magnitude.numTrials = 5;
34 Magnitude.successThreshold = 0.40; // 2 out of 5
35 Magnitude.tolerance = 0.35;
36 Magnitude.trim = 1;
37
38 Magnitude.initialExponent = 9;
39 Magnitude.numPoints = 5;
40 Magnitude.run(setupFunction1, test, Magnitude.LINEAR);
41 Magnitude.initialExponent = 12;
42 Magnitude.numPoints = 5;
43 Magnitude.run(setupFunction2, test, Magnitude.LINEAR);
44
45 </script>
46 </body>
OLDNEW
« no previous file with comments | « LayoutTests/perf/array-reverse-expected.txt ('k') | LayoutTests/perf/class-list-remove-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698