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

Unified Diff: samples/third_party/dromaeo/tests/dom-modify-html.dart

Issue 10873014: Fix up Dromaeo tests for the removal of the Math.random call. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/third_party/dromaeo/tests/dom-modify-html.dart
===================================================================
--- samples/third_party/dromaeo/tests/dom-modify-html.dart (revision 11181)
+++ samples/third_party/dromaeo/tests/dom-modify-html.dart (working copy)
@@ -7,11 +7,12 @@
void main() {
final int num = 400;
+ var random = new Math.Random();
String str = 'null';
// Very ugly way to build up the string, but let's mimic JS version as much as possible.
for (int i = 0; i < 1024; i++) {
- str = "$str${new String.fromCharCodes([((25 * Math.random()) + 97).toInt()])}";
+ str = "$str${new String.fromCharCodes([((25 * random.nextDouble()) + 97).toInt()])}";
}
List<Node> elems = <Node>[];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698