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

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

Issue 2899793003: Move PerformanceTests/Editing/move-up-with-hidden-elements.html to DOM/ (Closed)
Patch Set: Created 3 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
« no previous file with comments | « third_party/WebKit/PerformanceTests/DOM/move-up-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 kElements = 10000;
6
7 const metaElements = (() => {
8 const result = [];
9 for (let count = 0; count < kElements; ++count)
10 result.push('<meta>', '</meta>');
11 return result;
12 })();
13 const sample = document.getElementById('sample');
14 sample.innerHTML = [
15 '<h1 id="before">first line of renderered text</h1>',
16 '<div hidden>', ...metaElements, '</div>',
17 '<h1 id="target">second line of renderered text</h1>',
18 '<div hidden>', ...metaElements, '</div>',
19 '<h1 id="after">third line of renderered text</h1>',
20 ].join('');
21
22 const selection = window.getSelection();
23
24 PerfTestRunner.measureTime({
25 description: 'Measures performance of move-up through non-renderered elements' ,
26 setup: () => {
27 selection.removeAllRanges();
28 const target = document.getElementById('target');
29 selection.collapse(target.firstChild, 5);
30 selection.extend(target.firstChild, 10);
31 },
32 run: () => {
33 selection.modify('extend', 'backward', 'line');
34 },
35 });
36 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/PerformanceTests/DOM/move-up-with-hidden-elements.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698