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

Unified Diff: LayoutTests/perf/clone-with-focus.html

Issue 51383002: Delete perf tests that are WontFixed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: try again Created 7 years, 2 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 | « LayoutTests/perf/class-list-remove-expected.txt ('k') | LayoutTests/perf/clone-with-focus-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/perf/clone-with-focus.html
diff --git a/LayoutTests/perf/clone-with-focus.html b/LayoutTests/perf/clone-with-focus.html
deleted file mode 100644
index 65823549457e281e7c715e9c71aac0b2067046f0..0000000000000000000000000000000000000000
--- a/LayoutTests/perf/clone-with-focus.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html>
-<html>
- <body>
- <input id="input">
- <ul id="list"><li><span></span></li></ul>
- <div id="console"></div>
-
- <script>
- if (window.testRunner)
- testRunner.dumpAsText();
-
- var listElement = document.getElementById('list');
- var templateElement = list.firstChild;
- var inputElement = document.getElementById('input');
-
- function test(numberOfElements, focusInput)
- {
- if (focusInput)
- inputElement.focus();
-
- var startTime = Date.now();
- for (var i = 0; i < numberOfElements; i++) {
- var clone = templateElement.cloneNode(true);
- clone.childNodes[0].textContent = i;
- listElement.appendChild(clone);
- }
- var endTime = Date.now();
-
- if (focusInput)
- inputElement.blur();
-
- while (listElement.firstChild != listElement.lastChild)
- listElement.removeChild(listElement.lastChild);
-
- return endTime - startTime;
- }
-
- function log(str)
- {
- var element = document.createElement('div');
- element.appendChild(document.createTextNode(str));
- document.getElementById('console').appendChild(element);
- }
-
- var timeWithoutFocus = test(1000, false);
- var timeWithFocus = test(1000, true);
-
- if (Math.abs(timeWithFocus - timeWithoutFocus) <= timeWithoutFocus) {
- log('PASS. Cloning elements takes roughly as long with as without focus.');
- } else {
- log('FAIL. Cloning 1000 elements with focus took ' + timeWithFocus + 'ms, without took ' + timeWithoutFocus + 'ms.');
- }
- </script>
- </body>
-</html>
« no previous file with comments | « LayoutTests/perf/class-list-remove-expected.txt ('k') | LayoutTests/perf/clone-with-focus-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698