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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/dromaeo/tests/dromaeo-object-array.html
===================================================================
--- chrome/test/data/dromaeo/tests/dromaeo-object-array.html (revision 0)
+++ chrome/test/data/dromaeo/tests/dromaeo-object-array.html (revision 0)
@@ -0,0 +1,64 @@
+<html>
+<head>
+<script src="../htmlrunner.js"></script>
+<script>
+window.onload = function(){ startTest("dromaeo-object-array", '');
+
+var ret = [], tmp, num = 500;
+var i = 1024;
+
+ // TESTS: Array Building
+
+ test("Array Construction, []", function(){
+ for ( var j = 0; j < i * 15; j++ ) {
+ ret = [];
+ ret.length = i;
+ }
+ });
+
+ test("Array Construction, new Array()", function(){
+ for ( var j = 0; j < i * 10; j++ )
+ ret = new Array(i);
+ });
+
+ test("Array Construction, unshift", function(){
+ ret = [];
+ for ( var j = 0; j < i; j++ )
+ ret.unshift(j);
+ });
+
+ test("Array Construction, splice", function(){
+ ret = [];
+ for ( var j = 0; j < i; j++ )
+ ret.splice(0,0,j);
+ });
+
+ test("Array Deconstruction, shift", function(){
+ var a = ret.slice();
+ for ( var j = 0; j < i; j++ )
+ tmp = a.shift();
+ });
+
+ test("Array Deconstruction, splice", function(){
+ var a = ret.slice();
+ for ( var j = 0; j < i; j++ )
+ tmp = a.splice(0,1);
+ });
+
+ test("Array Construction, push", function(){
+ ret = [];
+ for ( var j = 0; j < i * 25; j++ )
+ ret.push(j);
+ });
+
+ test("Array Deconstruction, pop", function(){
+ var a = ret.slice();
+ for ( var j = 0; j < i * 25; j++ )
+ tmp = a.pop();
+ });
+
+endTest(); };
+</script>
+</head>
+<body></body>
+</html>
« 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