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

Unified Diff: mozilla-tests/e4x/Regress/regress-354998.js

Issue 2865028: Update the mozilla tests to new version (as of 2010-06-29). (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years, 6 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
« no previous file with comments | « mozilla-tests/e4x/Regress/regress-350238.js ('k') | mozilla-tests/e4x/Regress/regress-355569.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mozilla-tests/e4x/Regress/regress-354998.js
===================================================================
--- mozilla-tests/e4x/Regress/regress-354998.js (revision 43940)
+++ mozilla-tests/e4x/Regress/regress-354998.js (working copy)
@@ -48,39 +48,46 @@
function test()
{
- var list = <><a/><b/></>;
- var count = 0;
- var now = Date.now;
- var time = now();
- for (var i in list) {
- ++count;
- }
- time = now() - time;
- if (count != 2) {
- if (count < 2)
- throw "Enumerator has not looped over all properties, count="+count;
- throw "Enumerator has looped over prototype chain of xml, count="+count;
- }
- return time;
+ var list = <><a/><b/></>;
+ var count = 0;
+ var now = Date.now;
+ var time = now();
+ for (var i in list) {
+ ++count;
+ }
+ time = now() - time;
+ if (count != 2) {
+ if (count < 2)
+ throw "Enumerator has not looped over all properties, count="+count;
+ throw "Enumerator has looped over prototype chain of xml, count="+count;
+ }
+ return time;
}
-var time1 = test();
+try
+{
+ var time1 = test();
-for (var i = 0; i != 1000*1000; ++i)
- Object.prototype[i] = i;
+ for (var i = 0; i != 1000*1000; ++i)
+ Object.prototype[i] = i;
-var time2 = test();
+ var time2 = test();
-// clean up Object prototype so it won't
-// hang enumerations in options()...
+ // clean up Object prototype so it won't
+ // hang enumerations in options()...
-for (var i = 0; i != 1000*1000; ++i)
- delete Object.prototype[i];
+ for (var i = 0; i != 1000*1000; ++i)
+ delete Object.prototype[i];
-if (time1 * 10 + 1 < time2) {
- throw "Assigns to Object.prototype increased time of XML enumeration from "+
- time1+"ms to "+time2+"ms";
+ if (time1 * 10 + 1 < time2) {
+ throw "Assigns to Object.prototype increased time of XML enumeration from "+
+ time1+"ms to "+time2+"ms";
+ }
}
+catch(ex)
+{
+ actual = ex = '';
+}
TEST(1, expect, actual);
« no previous file with comments | « mozilla-tests/e4x/Regress/regress-350238.js ('k') | mozilla-tests/e4x/Regress/regress-355569.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698