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

Side by Side Diff: LayoutTests/fast/events/drag-selects-culled-inlines.html

Issue 1308663003: The node and allowPartialContainment arguments for Selection API should not be optional (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style> 2 <style>
3 .style1 { font-size: 14px; color: #CC3300; } 3 .style1 { font-size: 14px; color: #CC3300; }
4 .text1 { font-size: 11px; color: #7f0000; } 4 .text1 { font-size: 11px; color: #7f0000; }
5 </style> 5 </style>
6 <div id="test" class="style1"> 6 <div id="test" class="style1">
7 <font> 7 <font>
8 <span class="text1">Some Text1 <span id="noRange" style="font-weight: 400"> <b>S ome Text2</b></span><br>Some Text3<br><b id="lastLine">Some Text4</b><br></span> 8 <span class="text1">Some Text1 <span id="noRange" style="font-weight: 400"> <b>S ome Text2</b></span><br>Some Text3<br><b id="lastLine">Some Text4</b><br></span>
9 </font> 9 </font>
10 </div> 10 </div>
11 <p id="description"> 11 <p id="description">
12 <div id="console"> 12 <div id="console">
13 </div> 13 </div>
14 </p> 14 </p>
15 <script src="../../resources/js-test.js"></script> 15 <script src="../../resources/js-test.js"></script>
16 <script> 16 <script>
17 jsTestIsAsync = true; 17 jsTestIsAsync = true;
18 var selectionComplete = false; 18 var selectionComplete = false;
19 description('Test that flickering is observed on text selection when culled inline is selected'); 19 description('Test that flickering is observed on text selection when culled inline is selected');
20 20
21 document.onselectionchange = function () { 21 document.onselectionchange = function () {
22 shouldBeFalse("window.getSelection().containsNode(document.getElementByI d('noRange'))"); 22 shouldBeFalse("window.getSelection().containsNode(document.getElementByI d('noRange'), false)");
23 if (selectionComplete) 23 if (selectionComplete)
24 finishJSTest(); 24 finishJSTest();
25 } 25 }
26 26
27 if (window.testRunner && window.eventSender) { 27 if (window.testRunner && window.eventSender) {
28 var lastLine = document.getElementById('lastLine'); 28 var lastLine = document.getElementById('lastLine');
29 29
30 eventSender.mouseMoveTo(lastLine.offsetLeft + 10, lastLine.offsetTop + l astLine.offsetHeight); 30 eventSender.mouseMoveTo(lastLine.offsetLeft + 10, lastLine.offsetTop + l astLine.offsetHeight);
31 eventSender.mouseDown(); 31 eventSender.mouseDown();
32 32
33 // move to the position of culled inline. 33 // move to the position of culled inline.
34 eventSender.mouseMoveTo(lastLine.offsetLeft + 10, lastLine.offsetTop - 1 ); 34 eventSender.mouseMoveTo(lastLine.offsetLeft + 10, lastLine.offsetTop - 1 );
35 eventSender.mouseUp(); 35 eventSender.mouseUp();
36 selectionComplete = true; 36 selectionComplete = true;
37 } 37 }
38 </script> 38 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698