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

Side by Side Diff: test/perf/input/class_binding_test.html

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/bindings_test.html ('k') | test/perf/input/create_100_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 <!DOCTYPE html>
2 <!--
3 Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 for details. All rights reserved. Use of this source code is governed by a
5 BSD-style license that can be found in the LICENSE file.
6 -->
7 <html lang="en">
8 <head>
9 <!--
10 This performance test toggles a css class on each benchmark iteration.
11 -->
12 <meta charset="utf-8">
13 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
14 <script type="application/javascript" src="testing.js"></script>
15 <script type="application/javascript" src="start_dart.js"></script>
16 <style>
17 .blue { color: #00F; }
18 .red { color: #F00; }
19 </style>
20 </head>
21 <body>
22 <div class="{{color}}">x</div>
23 <script type="application/dart">
24 import 'dart:html';
25 import 'package:web_ui/web_ui.dart';
26 import 'package:unittest/unittest.dart';
27 import 'perf_common.dart';
28
29 main() {
30 useShadowDom = false;
31 window.setTimeout(() {
32 var bench = new CssBindingBenchmark();
33 perfDone(bench.measure());
34 }, 0);
35 }
36
37 String color;
38
39 class CssBindingBenchmark extends BenchmarkBase {
40 CssBindingBenchmark() : super('class-bind');
41 run() {
42 if (color == null || color == 'blue') {
43 color = 'red';
44 } else {
45 color = 'blue';
46 }
47 dispatch();
48 }
49 }
50 </script>
51 </body>
52 </html>
OLDNEW
« no previous file with comments | « test/perf/input/bindings_test.html ('k') | test/perf/input/create_100_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698