| 
									
										
										
										
											2015-10-13 00:29:13 -07:00
										 |  |  | import {runClickBenchmark, verifyNoBrowserErrors} from 'angular2/src/testing/perf_util'; | 
					
						
							| 
									
										
										
										
											2015-04-29 18:11:56 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-03 10:04:27 -07:00
										 |  |  | describe('react tree benchmark', function() { | 
					
						
							| 
									
										
										
										
											2015-04-29 18:11:56 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |   var URL = 'benchmarks_external/src/tree/react/index.html'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-03 10:04:27 -07:00
										 |  |  |   afterEach(verifyNoBrowserErrors); | 
					
						
							| 
									
										
										
										
											2015-04-29 18:11:56 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |   it('should log the stats (create)', function(done) { | 
					
						
							| 
									
										
										
										
											2015-06-03 10:04:27 -07:00
										 |  |  |     runClickBenchmark({ | 
					
						
							| 
									
										
										
										
											2015-04-29 18:11:56 -07:00
										 |  |  |       url: URL, | 
					
						
							|  |  |  |       buttons: ['#destroyDom', '#createDom'], | 
					
						
							|  |  |  |       id: 'react.tree.create', | 
					
						
							| 
									
										
										
										
											2015-08-27 17:44:59 +02:00
										 |  |  |       params: [{name: 'depth', value: 9, scale: 'log2'}], | 
					
						
							|  |  |  |       waitForAngular2: false | 
					
						
							| 
									
										
										
										
											2015-04-29 18:11:56 -07:00
										 |  |  |     }).then(done, done.fail); | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   it('should log the stats (update)', function(done) { | 
					
						
							| 
									
										
										
										
											2015-06-03 10:04:27 -07:00
										 |  |  |     runClickBenchmark({ | 
					
						
							| 
									
										
										
										
											2015-04-29 18:11:56 -07:00
										 |  |  |       url: URL, | 
					
						
							|  |  |  |       buttons: ['#createDom'], | 
					
						
							|  |  |  |       id: 'react.tree.update', | 
					
						
							| 
									
										
										
										
											2015-08-27 17:44:59 +02:00
										 |  |  |       params: [{name: 'depth', value: 9, scale: 'log2'}], | 
					
						
							|  |  |  |       waitForAngular2: false | 
					
						
							| 
									
										
										
										
											2015-04-29 18:11:56 -07:00
										 |  |  |     }).then(done, done.fail); | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | }); |