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

Side by Side Diff: LayoutTests/editing/execCommand/move-up-down-should-skip-hidden-elements.html

Issue 20049007: Speed up moving cursor/selection up or down past non-renderered elements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/editing/execCommand/move-up-down-should-skip-hidden-elements-expected.txt » ('j') | 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 <html>
3 <head>
4 <script src="../../fast/js/resources/js-test-pre.js"></script>
5 <title>Test moving up and down through non-renderered elements.</title>
6 </head>
7 <body>
8 <div id="before" hidden></div>
9 <h1 id="first_line">First line of rendered text</h1>
10 <div id="after" hidden></div>
11
12 <p id="description"></p>
13 <div id="console"></div>
14
15 <script>
16 description("Test moving up and down through non-renderered elements. This test should execute quickly if it's working correctly; a timeout is a failure.");
leviw_travelin_and_unemployed 2013/07/24 18:13:56 Could this be a Magnitude test instead? See Layout
dmazzoni 2013/07/24 18:22:11 Happy to use Magnitude where it makes sense. In t
leviw_travelin_and_unemployed 2013/07/26 04:40:11 Sounds reasonable. LGTM :)
17
18 var before = document.getElementById("before");
19 var after = document.getElementById("after");
20 for (var i = 0; i < 1000; i++) {
21 before.appendChild(document.createElement("meta"));
22 after.appendChild(document.createElement("meta"));
23 }
24
25 function selectFirstLine() {
26 var selection = document.getSelection();
27 selection.removeAllRanges();
28 var range = document.createRange();
29 range.selectNode(document.getElementById("first_line"));
30 selection.addRange(range);
31 }
32
33 for (var i = 0; i < 100; i++) {
34 selectFirstLine();
35 if (window.testRunner)
36 testRunner.execCommand("MoveUpAndModifySelection");
37
38 selectFirstLine();
39 if (window.testRunner)
40 testRunner.execCommand("MoveDownAndModifySelection");
41 }
42
43 before.textContent = "";
44 after.textContent = "";
45
46 </script>
47 <script src="../../fast/js/resources/js-test-post.js"></script>
48 </body>
49 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/execCommand/move-up-down-should-skip-hidden-elements-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698