OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <body> | 2 <body> |
3 <script src="../resources/runner.js"></script> | 3 <script src="../resources/runner.js"></script> |
| 4 <script src="resources/paint.js"></script> |
4 <style> | 5 <style> |
5 span { | 6 span { |
6 padding: 1px; | 7 padding: 1px; |
7 } | 8 } |
8 .changeColor { | 9 .changeColor { |
9 background-color: green; | 10 background-color: green; |
10 } | 11 } |
11 </style> | 12 </style> |
12 <script> | 13 <script> |
13 // This test measures the lifecycle update performance of changing background | 14 // This test measures the lifecycle update performance of changing background |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 "rgb(255, 64, 64)", | 61 "rgb(255, 64, 64)", |
61 "rgb(237, 127, 18)", | 62 "rgb(237, 127, 18)", |
62 "rgb(191, 191, 1)", | 63 "rgb(191, 191, 1)", |
63 "rgb(128, 237, 18)", | 64 "rgb(128, 237, 18)", |
64 "rgb(64, 255, 64)", | 65 "rgb(64, 255, 64)", |
65 "rgb(18, 237, 127)", | 66 "rgb(18, 237, 127)", |
66 "rgb(1, 191, 191)", | 67 "rgb(1, 191, 191)", |
67 "rgb(18, 128, 237)", | 68 "rgb(18, 128, 237)", |
68 "rgb(64, 64, 255)" | 69 "rgb(64, 64, 255)" |
69 ]; | 70 ]; |
70 PerfTestRunner.measureFrameTime({ | 71 measurePaint({ |
71 run: function() { | 72 run: function() { |
72 runCount++; | 73 runCount++; |
73 var newColor = colors[runCount % colors.length]; | 74 var newColor = colors[runCount % colors.length]; |
74 for (var index = 0; index < elementsToChange.length; index++) | 75 for (var index = 0; index < elementsToChange.length; index++) |
75 elementsToChange[index].style.backgroundColor = newColor; | 76 elementsToChange[index].style.backgroundColor = newColor; |
76 }, | 77 }, |
77 }); | 78 }); |
78 </script> | 79 </script> |
79 </body> | 80 </body> |
OLD | NEW |