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

Side by Side Diff: chrome/test/data/webui/link_controller_test.html

Issue 2059913002: Remove keyIdentifier usage in chrome/browser/resources/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chromeos build 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 | « chrome/test/data/keyevents_test.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="mock_controller.js"></script> 4 <script src="mock_controller.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 8
9 var mockControl, mockWindow, oldIsMac; 9 var mockControl, mockWindow, oldIsMac;
10 var chrome = chrome || {}; 10 var chrome = chrome || {};
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 button: 0, 83 button: 0,
84 shiftKey: true, 84 shiftKey: true,
85 metaKey: true 85 metaKey: true
86 }; 86 };
87 openUrlFromEventHelper(e, true, cr.LinkKind.FOREGROUND_TAB); 87 openUrlFromEventHelper(e, true, cr.LinkKind.FOREGROUND_TAB);
88 } 88 }
89 89
90 function testOpenUrlFromEventForegroundTabEnter() { 90 function testOpenUrlFromEventForegroundTabEnter() {
91 var e = { 91 var e = {
92 type: 'keydown', 92 type: 'keydown',
93 keyIdentifier: 'Enter', 93 key: 'Enter',
94 shiftKey: true, 94 shiftKey: true,
95 ctrlKey: true 95 ctrlKey: true
96 }; 96 };
97 openUrlFromEventHelper(e, false, cr.LinkKind.FOREGROUND_TAB); 97 openUrlFromEventHelper(e, false, cr.LinkKind.FOREGROUND_TAB);
98 } 98 }
99 99
100 function testOpenUrlFromEventForegroundTabEnterMac() { 100 function testOpenUrlFromEventForegroundTabEnterMac() {
101 var e = { 101 var e = {
102 type: 'keydown', 102 type: 'keydown',
103 keyIdentifier: 'Enter', 103 key: 'Enter',
104 shiftKey: true, 104 shiftKey: true,
105 metaKey: true 105 metaKey: true
106 }; 106 };
107 openUrlFromEventHelper(e, true, cr.LinkKind.FOREGROUND_TAB); 107 openUrlFromEventHelper(e, true, cr.LinkKind.FOREGROUND_TAB);
108 } 108 }
109 109
110 function testOpenUrlFromEventForegroundTabMiddleClick() { 110 function testOpenUrlFromEventForegroundTabMiddleClick() {
111 var e = { 111 var e = {
112 type: 'click', 112 type: 'click',
113 button: 1, 113 button: 1,
(...skipping 18 matching lines...) Expand all
132 type: 'click', 132 type: 'click',
133 button: 0, 133 button: 0,
134 metaKey: true 134 metaKey: true
135 }; 135 };
136 openUrlFromEventHelper(e, true, cr.LinkKind.BACKGROUND_TAB); 136 openUrlFromEventHelper(e, true, cr.LinkKind.BACKGROUND_TAB);
137 } 137 }
138 138
139 function testOpenUrlFromEventBackgroundTabEnter() { 139 function testOpenUrlFromEventBackgroundTabEnter() {
140 var e = { 140 var e = {
141 type: 'keydown', 141 type: 'keydown',
142 keyIdentifier: 'Enter', 142 key: 'Enter',
143 ctrlKey: true 143 ctrlKey: true
144 }; 144 };
145 openUrlFromEventHelper(e, false, cr.LinkKind.BACKGROUND_TAB); 145 openUrlFromEventHelper(e, false, cr.LinkKind.BACKGROUND_TAB);
146 } 146 }
147 147
148 function testOpenUrlFromEventBackgroundTabEnterMac() { 148 function testOpenUrlFromEventBackgroundTabEnterMac() {
149 var e = { 149 var e = {
150 type: 'keydown', 150 type: 'keydown',
151 keyIdentifier: 'Enter', 151 key: 'Enter',
152 metaKey: true 152 metaKey: true
153 }; 153 };
154 openUrlFromEventHelper(e, true, cr.LinkKind.BACKGROUND_TAB); 154 openUrlFromEventHelper(e, true, cr.LinkKind.BACKGROUND_TAB);
155 } 155 }
156 156
157 function testOpenUrlFromEventBackgroundTabMiddleClick() { 157 function testOpenUrlFromEventBackgroundTabMiddleClick() {
158 var e = { 158 var e = {
159 type: 'click', 159 type: 'click',
160 button: 1 160 button: 1
161 }; 161 };
162 openUrlFromEventHelper(e, false, cr.LinkKind.BACKGROUND_TAB); 162 openUrlFromEventHelper(e, false, cr.LinkKind.BACKGROUND_TAB);
163 } 163 }
164 164
165 /////////////////////////////////////////////////////////////////////////////// 165 ///////////////////////////////////////////////////////////////////////////////
166 166
167 function testOpenUrlFromEventWindow() { 167 function testOpenUrlFromEventWindow() {
168 var e = { 168 var e = {
169 type: 'click', 169 type: 'click',
170 button: 0, 170 button: 0,
171 shiftKey: true 171 shiftKey: true
172 }; 172 };
173 openUrlFromEventHelper(e, false, cr.LinkKind.WINDOW); 173 openUrlFromEventHelper(e, false, cr.LinkKind.WINDOW);
174 } 174 }
175 175
176 function testOpenUrlFromEventWindowEnter() { 176 function testOpenUrlFromEventWindowEnter() {
177 var e = { 177 var e = {
178 type: 'keydown', 178 type: 'keydown',
179 keyIdentifier: 'Enter', 179 key: 'Enter',
180 shiftKey: true 180 shiftKey: true
181 }; 181 };
182 openUrlFromEventHelper(e, false, cr.LinkKind.WINDOW); 182 openUrlFromEventHelper(e, false, cr.LinkKind.WINDOW);
183 } 183 }
184 184
185 /////////////////////////////////////////////////////////////////////////////// 185 ///////////////////////////////////////////////////////////////////////////////
186 186
187 function testOpenUrlFromEventSelf() { 187 function testOpenUrlFromEventSelf() {
188 var e = { 188 var e = {
189 type: 'click', 189 type: 'click',
190 button: 0 190 button: 0
191 }; 191 };
192 openUrlFromEventHelper(e, false, cr.LinkKind.SELF); 192 openUrlFromEventHelper(e, false, cr.LinkKind.SELF);
193 } 193 }
194 194
195 function testOpenUrlFromEventSelfEnter() { 195 function testOpenUrlFromEventSelfEnter() {
196 var e = { 196 var e = {
197 type: 'keydown', 197 type: 'keydown',
198 keyIdentifier: 'Enter' 198 key: 'Enter'
199 }; 199 };
200 openUrlFromEventHelper(e, false, cr.LinkKind.SELF); 200 openUrlFromEventHelper(e, false, cr.LinkKind.SELF);
201 } 201 }
202 202
203 /////////////////////////////////////////////////////////////////////////////// 203 ///////////////////////////////////////////////////////////////////////////////
204 204
205 function testOpenUrl() { 205 function testOpenUrl() {
206 var lc = new cr.LinkController(localStrings); 206 var lc = new cr.LinkController(localStrings);
207 207
208 var mock = mockController.createFunctionMock(lc, 'openUrls'); 208 var mock = mockController.createFunctionMock(lc, 'openUrls');
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 url: [URL1, BASE + URL2], 283 url: [URL1, BASE + URL2],
284 incognito: true 284 incognito: true
285 }); 285 });
286 286
287 lc.openUrls([URL1, URL2], cr.LinkKind.INCOGNITO); 287 lc.openUrls([URL1, URL2], cr.LinkKind.INCOGNITO);
288 } 288 }
289 289
290 </script> 290 </script>
291 </body> 291 </body>
292 </html> 292 </html>
OLDNEW
« no previous file with comments | « chrome/test/data/keyevents_test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698