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

Side by Side Diff: third_party/WebKit/PerformanceTests/Editing/move-up-with-hidden-elements.html

Issue 2689183003: Convert layout test move-up-down-should-skip-hidden-elements.html to performance test (Closed)
Patch Set: 2017-02-14T13:13:29 Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/PerformanceTests/Editing/move-down-with-hidden-elements.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!doctype html>
2 <script src="../resources/runner.js"></script>
3 <div id="sample"></div>
4 <script>
5 const kCount = 10;
6 const kElements = 10000;
7
8 const metaElements = (() => {
9 const result = [];
10 for (let count = 0; count < kElements; ++count)
11 result.push('<meta>', '</meta>');
12 return result;
13 })();
14 const sample = document.getElementById('sample');
15 sample.innerHTML = [
16 '<div hiddent>', ...metaElements, '</div>',
17 '<h1 id="target">first line of renderered text</h1>',
18 '<div hiddent>', ...metaElements, '</div>',
19 ].join('');
20
21 const selection = window.getSelection();
22 const target = document.getElementById('target');
23
24 PerfTestRunner.measureRunsPerSecond({
25 description: 'Measures performance of move-up through non-renderered elements' ,
26 run: () => {
27 selection.collapse(target, 0);
28 selection.extend(target, target.childNodes.length);
29 for (let counter = 0; counter < kCount; ++counter)
30 selection.modify('move', 'backward', 'line');
31 },
32 });
33 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/PerformanceTests/Editing/move-down-with-hidden-elements.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698