OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/editing/VisibleSelection.h" | 5 #include "core/editing/VisibleSelection.h" |
6 | 6 |
7 #include "core/dom/Range.h" | 7 #include "core/dom/Range.h" |
8 #include "core/editing/EditingTestBase.h" | 8 #include "core/editing/EditingTestBase.h" |
9 #include "core/editing/SelectionAdjuster.h" | |
10 | 9 |
11 #define LOREM_IPSUM \ | 10 #define LOREM_IPSUM \ |
12 "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod " \ | 11 "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod " \ |
13 "tempor " \ | 12 "tempor " \ |
14 "incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, " \ | 13 "incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, " \ |
15 "quis nostrud " \ | 14 "quis nostrud " \ |
16 "exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. " \ | 15 "exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. " \ |
17 "Duis aute irure " \ | 16 "Duis aute irure " \ |
18 "dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat " \ | 17 "dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat " \ |
19 "nulla pariatur." \ | 18 "nulla pariatur." \ |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 Element* host = document().getElementById("host"); | 530 Element* host = document().getElementById("host"); |
532 host->appendChild(sample); | 531 host->appendChild(sample); |
533 document().updateStyleAndLayout(); | 532 document().updateStyleAndLayout(); |
534 | 533 |
535 // Simulates to restore selection from undo stack. | 534 // Simulates to restore selection from undo stack. |
536 selection = createVisibleSelection(selection.asSelection()); | 535 selection = createVisibleSelection(selection.asSelection()); |
537 EXPECT_EQ(Position(sample->firstChild(), 0), selection.start()); | 536 EXPECT_EQ(Position(sample->firstChild(), 0), selection.start()); |
538 } | 537 } |
539 | 538 |
540 } // namespace blink | 539 } // namespace blink |
OLD | NEW |