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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/modify_move/move_backward_line_import_crash.html

Issue 2084913005: Revert of Make previousLinePosition() not to use dangling RootInlineBox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | third_party/WebKit/Source/core/editing/VisibleUnits.cpp » ('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 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <div id="sample"></div>
5 <div id="log"></div>
6 <script>
7 test(() => {
8 var sample = document.getElementById('sample');
9 sample.innerHTML = '<select><option>1</option></select><style>@import url(-) </style>';
10 // Mark tree dirty
11 document.body.appendChild(sample);
12 // Force layout
13 sample.offsetHeight;
14
15 var importElement = document.createElement('link');
16 importElement.setAttribute('rel', 'import');
17 sample.appendChild(importElement);
18
19 var selection = window.getSelection();
20 selection.collapse(sample, 1);
21 selection.modify('move', 'backward', 'line');
22
23 assert_equals(selection.anchorNode, sample, 'anchorNode');
24 assert_equals(selection.anchorOffset, 0, 'anchorOffset');
25 assert_equals(selection.focusNode, sample, 'focusNode');
26 assert_equals(selection.focusOffset, 0, 'focusOffset');
27 }, 'move backward line should not crash with link/import');
28 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698