| OLD | NEW |
| (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 instantiates 100 custom elements. |
| 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 </head> |
| 17 <body> |
| 18 <element name="x-e" extends="span"> |
| 19 <template>.</template> |
| 20 </element> |
| 21 <template instantiate="if cond"> |
| 22 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 23 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 24 <br> |
| 25 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 26 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 27 <br> |
| 28 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 29 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 30 <br> |
| 31 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 32 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 33 <br> |
| 34 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 35 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 36 <br> |
| 37 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 38 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 39 <br> |
| 40 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 41 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 42 <br> |
| 43 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 44 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 45 <br> |
| 46 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 47 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 48 <br> |
| 49 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 50 <x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e><x-e></x-e> |
| 51 <br> |
| 52 </template> |
| 53 <script type="application/dart"> |
| 54 import 'dart:html'; |
| 55 import 'package:web_ui/web_ui.dart'; |
| 56 import 'package:unittest/unittest.dart'; |
| 57 import 'perf_common.dart'; |
| 58 |
| 59 main() { |
| 60 useShadowDom = false; |
| 61 window.setTimeout(() { |
| 62 var bench = new CreateBenchmark(); |
| 63 perfDone(bench.measure()); |
| 64 }, 0); |
| 65 } |
| 66 |
| 67 bool cond = false; |
| 68 |
| 69 class CreateBenchmark extends BenchmarkBase { |
| 70 CreateBenchmark() : super('create-100'); |
| 71 setup() { |
| 72 cond = false; |
| 73 } |
| 74 |
| 75 run() { |
| 76 cond = true; |
| 77 dispatch(); |
| 78 } |
| 79 } |
| 80 </script> |
| 81 </body> |
| 82 </html> |
| OLD | NEW |