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

Side by Side Diff: chrome/test/data/dromaeo/tests/dromaeo-object-array.html

Issue 269054: Importing dromaeo performance tests to src/chrome/test/data.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 months 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 <html>
2 <head>
3 <script src="../htmlrunner.js"></script>
4 <script>
5 window.onload = function(){ startTest("dromaeo-object-array", '');
6
7 var ret = [], tmp, num = 500;
8 var i = 1024;
9
10 // TESTS: Array Building
11
12 test("Array Construction, []", function(){
13 for ( var j = 0; j < i * 15; j++ ) {
14 ret = [];
15 ret.length = i;
16 }
17 });
18
19 test("Array Construction, new Array()", function(){
20 for ( var j = 0; j < i * 10; j++ )
21 ret = new Array(i);
22 });
23
24 test("Array Construction, unshift", function(){
25 ret = [];
26 for ( var j = 0; j < i; j++ )
27 ret.unshift(j);
28 });
29
30 test("Array Construction, splice", function(){
31 ret = [];
32 for ( var j = 0; j < i; j++ )
33 ret.splice(0,0,j);
34 });
35
36 test("Array Deconstruction, shift", function(){
37 var a = ret.slice();
38 for ( var j = 0; j < i; j++ )
39 tmp = a.shift();
40 });
41
42 test("Array Deconstruction, splice", function(){
43 var a = ret.slice();
44 for ( var j = 0; j < i; j++ )
45 tmp = a.splice(0,1);
46 });
47
48 test("Array Construction, push", function(){
49 ret = [];
50 for ( var j = 0; j < i * 25; j++ )
51 ret.push(j);
52 });
53
54 test("Array Deconstruction, pop", function(){
55 var a = ret.slice();
56 for ( var j = 0; j < i * 25; j++ )
57 tmp = a.pop();
58 });
59
60 endTest(); };
61 </script>
62 </head>
63 <body></body>
64 </html>
OLDNEW
« no previous file with comments | « chrome/test/data/dromaeo/tests/dromaeo-core-eval.html ('k') | chrome/test/data/dromaeo/tests/dromaeo-object-regexp.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698