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

Side by Side Diff: LayoutTests/perf/accessibility-title-ui-element.html

Issue 1149253002: Remove LayoutTests/perf and associated references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../resources/magnitude-perf.js"></script>
5 <script>
6
7 var parentContainer;
8 var axControl;
9
10 function endsWith(str, suffix) {
11 return str.substr(str.length - suffix.length) == suffix;
12 }
13
14 function setup(magnitude) {
15 if (parentContainer)
16 document.body.removeChild(parentContainer);
17 parentContainer = document.createElement('div');
18 document.body.appendChild(parentContainer);
19
20 var junkContainer = document.createElement('div');
21 parentContainer.appendChild(junkContainer);
22
23 var label = document.createElement('label');
24 label.setAttribute('for', 'control');
25 label.innerText = 'Label';
26 parentContainer.appendChild(label);
27
28 var control = document.createElement('input');
29 control.type = 'text';
30 control.id = 'control';
31 parentContainer.appendChild(control);
32
33 parentContainer.offsetLeft;
34 axControl = accessibilityController.accessibleElementById('control');
35
36 for (var i = 0; i < 10 * magnitude; ++i) {
37 var div = document.createElement('div');
38 div.innerHTML = "<p></p><p></p><p></p><p></p><p></p>";
39 junkContainer.appendChild(div);
40 }
41 parentContainer.offsetLeft;
42 }
43
44 function test(magnitude) {
45 for (var i = 0; i < 100; i++) {
46 axControl.titleUIElement();
47 }
48 }
49
50 Magnitude.description("Tests that titleUIElement on an accessibility element run s in amortized constant time.");
51 Magnitude.numTrials = 5;
52 Magnitude.successThreshold = 0.40; // 2 out of 5
53 Magnitude.tolerance = 0.40;
54 Magnitude.trim = 2;
55 Magnitude.run(setup, test, Magnitude.CONSTANT);
56 </script>
57 </body>
58 </html>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/perf/accessibility-title-ui-element-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698