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

Side by Side Diff: test/perf/input/todomvc_common.dart

Issue 11683002: Setting up benchmarks and perf utilities (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
Patch Set: john comments Created 7 years, 11 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 unified diff | Download patch
« no previous file with comments | « test/perf/input/todomvc_async_test.html ('k') | test/perf/input/todomvc_test.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5
6 /** Common functions used by TodoMVC tests. */
7 library todomvc_common;
8
9 import 'dart:html';
10 import 'package:web_ui/watcher.dart';
11
12 void markChecked(item) {
13 var node = document.queryAll('input[type=checkbox]')[item + 1];
14 node.on.click.dispatch(new MouseEvent('click', window, 1, 0, 0, 0, 0, 0));
15 }
16
17 void checkAll() {
18 var node = document.queryAll('input[type=checkbox]')[0];
19 node.on.click.dispatch(new MouseEvent('click', window, 1, 0, 0, 0, 0, 0));
20 }
21
22 void clearCompleted() {
23 var node = document.query('#clear-completed');
24 node.on.click.dispatch(new MouseEvent('click', window, 1, 0, 0, 0, 0, 0));
25 }
26
27 var _newTodo = (() => document.query('#new-todo'))();
28 var _form = (() => document.query('#__e-0'))();
29
30 void addNote(String note) {
31 _newTodo.value = note;
32 _form.on.submit.dispatch(new Event('submit'));
33 dispatch();
34 }
OLDNEW
« no previous file with comments | « test/perf/input/todomvc_async_test.html ('k') | test/perf/input/todomvc_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698