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

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

Issue 10910013: Remove instances of dart:dom_deprecated from outside of lib/html and lib/dom. Part 1 of many. (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
Index: samples/third_party/dromaeo/tests/dom-modify-dom.dart
===================================================================
--- samples/third_party/dromaeo/tests/dom-modify-dom.dart (revision 11641)
+++ samples/third_party/dromaeo/tests/dom-modify-dom.dart (working copy)
@@ -1,69 +0,0 @@
-#library("dom_modify");
-#import("dart:dom_deprecated");
-#import("dart:json");
-#import("dart:math", prefix: "Math");
-#source("Common.dart");
-#source("RunnerSuite.dart");
-
-void main() {
- final int num = 400;
-
- 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()])}";
- }
-
- List<Node> elems = <Node>[];
-
- // Try to force real results.
- var ret;
-
- final htmlstr = document.body.innerHTML;
-
- new Suite(window, 'dom-modify')
- .test('createElement', () {
- for (int i = 0; i < num; i++) {
- ret = document.createElement('div');
- ret = document.createElement('span');
- ret = document.createElement('table');
- ret = document.createElement('tr');
- ret = document.createElement('select');
- }
- })
- .test('createTextNode', () {
- for (int i = 0; i < num; i++) {
- ret = document.createTextNode(str);
- ret = document.createTextNode('${str}2');
- ret = document.createTextNode('${str}3');
- ret = document.createTextNode('${str}4');
- ret = document.createTextNode('${str}5');
- }
- })
- .test('innerHTML', () {
- document.body.innerHTML = htmlstr;
- })
- .prep(() {
- elems = new List<Node>();
- final telems = document.body.childNodes;
- for (int i = 0; i < telems.length; i++) {
- elems.add(telems[i]);
- }
- })
- .test('cloneNode', () {
- for (int i = 0; i < elems.length; i++) {
- ret = elems[i].cloneNode(false);
- ret = elems[i].cloneNode(true);
- ret = elems[i].cloneNode(true);
- }
- })
- .test('appendChild', () {
- for (int i = 0; i < elems.length; i++)
- document.body.appendChild(elems[i]);
- })
- .test('insertBefore', () {
- for (int i = 0; i < elems.length; i++)
- document.body.insertBefore(elems[i], document.body.firstChild);
- })
- .end();
-}

Powered by Google App Engine
This is Rietveld 408576698