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

Unified Diff: chrome/test/data/chrome_endure/endurance_control_webdriver.html

Issue 9687001: Adding another control test for Chrome Endure that uses WebDriver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adjusted indentation of several lines. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/chrome_endure/endurance_control.html ('k') | chrome/test/functional/perf_endure.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/chrome_endure/endurance_control_webdriver.html
diff --git a/chrome/test/data/chrome_endure/endurance_control_webdriver.html b/chrome/test/data/chrome_endure/endurance_control_webdriver.html
new file mode 100644
index 0000000000000000000000000000000000000000..7168cee80d2b67eac977b9299737f8507d665570
--- /dev/null
+++ b/chrome/test/data/chrome_endure/endurance_control_webdriver.html
@@ -0,0 +1,47 @@
+<!--
+ This file is used as a control test to compare with the other Chrome Endure
+ tests in perf_endure.py.
+
+ This file provides the ability to attach/detach a large DOM tree (also
+ containing event listeners) in the live document. It is meant to be the same
+ as endurance_control.html, except it provides buttons that can be clicked to
+ cause the DOM tree to be attached/detached. This allows a control scenario
+ to be driven by WebDriver, rather than being driven by the Javascript itself.
+-->
+
+<html>
+ <head>
+ <script type='text/javascript'>
+
+ function attach_dom_tree() {
+ var last_node = document.createElement('div');
+ last_node.id = 'root_node';
+ var root_node = last_node;
+ for (i = 0; i < 1000; ++i) {
+ var node = document.createElement('div');
+ node.innerHTML = 'Node ' + i;
+ node.addEventListener('mousemove', mouse_move_callback, true);
+ last_node.appendChild(node);
+ last_node = node;
+ }
+ document.body.appendChild(root_node);
+ }
+
+ function detach_dom_tree() {
+ var root_node = document.getElementById('root_node');
+ document.body.removeChild(root_node);
+ }
+
+ function mouse_move_callback(event) {
+ // Stub.
+ }
+ </script>
+ <title>Chrome Endure Control Test with WebDriver</title>
+ </head>
+ <body>
+ <input type="button" id="attach" value="attach"
+ onclick="attach_dom_tree();" />
+ <input type="button" id="detach" value="detach"
+ onclick="detach_dom_tree();" />
+ </body>
+</html>
« no previous file with comments | « chrome/test/data/chrome_endure/endurance_control.html ('k') | chrome/test/functional/perf_endure.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698