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

Side by Side Diff: chrome/test/data/chrome_endure/endurance_control.html

Issue 9561010: Add a control test for Chrome Endure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/test/functional/perf_endure.py » ('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 <!--
2 This file is used as a control test to compare with the other Chrome Endure
3 tests in perf_endure.py.
4
5 This file creates a large DOM tree in the live document that also contains
6 event listeners. It then detaches the tree at the root. Since no JS
7 reference is kept, the tree should be collected by v8 at some point in the
8 future. As a result, if graphing DOM node and event listener count over time,
9 we expect to see a "sawtooth" pattern that does not show any overall tendency
10 to increase.
11 -->
12
13 <html>
14 <head>
15 <script type='text/javascript'>
16 function start_tests() {
17 run_detached_dom_test();
18 }
19
20 function run_detached_dom_test() {
21 var last_node = document.createElement('div');
22 var root_node = last_node;
23 for (i=0; i<1000; i++) {
24 var node = document.createElement('div');
25 node.innerHTML = 'Node ' + i;
26 node.addEventListener('mousemove', mouse_move_callback, true);
27 last_node.appendChild(node);
28 last_node = node;
29 }
30 document.body.appendChild(root_node);
31 setTimeout('run_detached_dom_test2()', 500);
32 }
33
34 function run_detached_dom_test2() {
35 // Detach the dom tree that was just created.
36 document.body.removeChild(document.body.firstChild);
37 setTimeout('run_detached_dom_test()', 500)
38 }
39
40 function mouse_move_callback(event) {
41 // Stub.
42 }
43 </script>
44 <title>Chrome Endure Control Test</title>
45 </head>
46 <body onload='start_tests()'>
47 </body>
48 </html>
OLDNEW
« no previous file with comments | « no previous file | chrome/test/functional/perf_endure.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698