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

Unified Diff: chrome/test/data/dromaeo/tests/dromaeo-core-eval.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-core-eval.html
===================================================================
--- chrome/test/data/dromaeo/tests/dromaeo-core-eval.html (revision 0)
+++ chrome/test/data/dromaeo/tests/dromaeo-core-eval.html (revision 0)
@@ -0,0 +1,35 @@
+<html>
+<head>
+<script src="../htmlrunner.js"></script>
+<script>
+window.onload = function(){ startTest("dromaeo-core-eval", '');
+
+// Try to force real results
+var ret, tmp;
+
+// The commands that we'll be evaling
+var cmd = 'var str="";for(var i=0;i<1000;i++){str += "a";}ret = str;';
+
+// TESTS: eval()
+var num = 4;
+
+prep(function(){
+ tmp = cmd;
+
+ for ( var n = 0; n < num; n++ )
+ tmp += tmp;
+});
+
+test( "Normal eval", function(){
+ eval(tmp);
+});
+
+test( "new Function", function(){
+ (new Function(tmp))();
+});
+
+endTest(); };
+</script>
+</head>
+<body></body>
+</html>
« no previous file with comments | « chrome/test/data/dromaeo/tests/dromaeo-3d-cube.html ('k') | chrome/test/data/dromaeo/tests/dromaeo-object-array.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698