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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/vertical-scrollbar-in-rtl.html

Issue 2100243002: Remove non-standardize key code names from event_sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix inspector tests that were missed by sed Created 4 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
OLDNEW
1 <html dir=rtl style="-webkit-writing-mode:vertical-lr"> 1 <html dir=rtl style="-webkit-writing-mode:vertical-lr">
2 <head> 2 <head>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 <script language="javascript"> 4 <script language="javascript">
5 window.jsTestIsAsync = true; 5 window.jsTestIsAsync = true;
6 6
7 function log(str) 7 function log(str)
8 { 8 {
9 var li = document.createElement("li"); 9 var li = document.createElement("li");
10 li.appendChild(document.createTextNode(str)); 10 li.appendChild(document.createTextNode(str));
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 window.resizeTo(window.innerWidth, 2000); 61 window.resizeTo(window.innerWidth, 2000);
62 assertEqual("resize preserves scroll position", window.scrollY, expectedScrollY); 62 assertEqual("resize preserves scroll position", window.scrollY, expectedScrollY);
63 63
64 // Test HOME/END operation. 64 // Test HOME/END operation.
65 if (window.eventSender) { 65 if (window.eventSender) {
66 // Not using assert equal here since the behavior is differe nt in each port. 66 // Not using assert equal here since the behavior is differe nt in each port.
67 // For example, in Mac, HOME/END key reset both x and y scro ll position. 67 // For example, in Mac, HOME/END key reset both x and y scro ll position.
68 // In Chromium, HOME/END key only reset y scroll position, a nd x scroll position is preserved. 68 // In Chromium, HOME/END key only reset y scroll position, a nd x scroll position is preserved.
69 function testEnd() { 69 function testEnd() {
70 window.scrollTo(expectedScrollX, expectedScrollY); 70 window.scrollTo(expectedScrollX, expectedScrollY);
71 eventSender.keyDown("end"); 71 eventSender.keyDown("End");
72 shouldBecomeEqual('window.scrollY == 0', 'true', testSel ectAll); 72 shouldBecomeEqual('window.scrollY == 0', 'true', testSel ectAll);
73 } 73 }
74 function testHome() { 74 function testHome() {
75 window.scrollTo(expectedScrollX, expectedScrollY); 75 window.scrollTo(expectedScrollX, expectedScrollY);
76 eventSender.keyDown("home"); 76 eventSender.keyDown("Home");
77 shouldBecomeEqual('window.scrollY == -3425', 'true', tes tEnd); 77 shouldBecomeEqual('window.scrollY == -3425', 'true', tes tEnd);
78 } 78 }
79 testHome(); 79 testHome();
80 } 80 }
81 81
82 function testSelectAll() { 82 function testSelectAll() {
83 // Test select all selects all document content. 83 // Test select all selects all document content.
84 window.resizeTo(500, 500); 84 window.resizeTo(500, 500);
85 var div = document.getElementById("div"); 85 var div = document.getElementById("div");
86 div.focus(); 86 div.focus();
87 document.execCommand("SelectAll"); 87 document.execCommand("SelectAll");
88 var selection = window.getSelection(); 88 var selection = window.getSelection();
89 assertEqual("selectAll selects all document", selection.toSt ring().substring(0, div.innerHTML.length), div.innerHTML); 89 assertEqual("selectAll selects all document", selection.toSt ring().substring(0, div.innerHTML.length), div.innerHTML);
90 90
91 div.style.display = "none"; 91 div.style.display = "none";
92 92
93 finishJSTest(); 93 finishJSTest();
94 } 94 }
95 } 95 }
96 </script> 96 </script>
97 </head> 97 </head>
98 <body> 98 <body>
99 <div id="div" style="whitespace:nowrap; width: 1000px; height: 4000px; b order: 1px solid red;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad m inim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea com modo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse c illum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non pro ident, sunt in culpa qui officia deserunt mollit anim id est laborum."</div> 99 <div id="div" style="whitespace:nowrap; width: 1000px; height: 4000px; b order: 1px solid red;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad m inim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea com modo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse c illum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non pro ident, sunt in culpa qui officia deserunt mollit anim id est laborum."</div>
100 <ul id="console" dir=ltr></ul> 100 <ul id="console" dir=ltr></ul>
101 </body> 101 </body>
102 </html> 102 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698