| 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>
|
|
|