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

Side by Side Diff: LayoutTests/fast/events/event-creation.html

Issue 14020004: Remove the remains of unused guards. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 7 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 <head> 1 <head>
2 <script src="../js/resources/js-test-pre.js"></script> 2 <script src="../js/resources/js-test-pre.js"></script>
3 </head> 3 </head>
4 <body> 4 <body>
5 <script> 5 <script>
6 description("This tests that document.createEvent is hooked up for all Event interfaces (and alternatives) and creates the right instance.") 6 description("This tests that document.createEvent is hooked up for all Event interfaces (and alternatives) and creates the right instance.")
7 7
8 // Event 8 // Event
9 shouldBeTrue("document.createEvent('Event') instanceof window.Event"); 9 shouldBeTrue("document.createEvent('Event') instanceof window.Event");
10 shouldBeTrue("document.createEvent('Event').constructor === window.Event"); 10 shouldBeTrue("document.createEvent('Event').constructor === window.Event");
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // shouldBeTrue("document.createEvent('SpeechInputEvent') instanceof window. SpeechInputEvent"); 197 // shouldBeTrue("document.createEvent('SpeechInputEvent') instanceof window. SpeechInputEvent");
198 // shouldBeTrue("document.createEvent('SpeechInputEvent') instanceof window. Event"); 198 // shouldBeTrue("document.createEvent('SpeechInputEvent') instanceof window. Event");
199 // shouldBeTrue("document.createEvent('SpeechInputEvent').constructor === wi ndow.SpeechInputEvent"); 199 // shouldBeTrue("document.createEvent('SpeechInputEvent').constructor === wi ndow.SpeechInputEvent");
200 200
201 // #if ENABLE(WEBGL) 201 // #if ENABLE(WEBGL)
202 // WebGLContextEvent 202 // WebGLContextEvent
203 // shouldBeTrue("document.createEvent('WebGLContextEvent') instanceof window .WebGLContextEvent"); 203 // shouldBeTrue("document.createEvent('WebGLContextEvent') instanceof window .WebGLContextEvent");
204 // shouldBeTrue("document.createEvent('WebGLContextEvent') instanceof window .Event"); 204 // shouldBeTrue("document.createEvent('WebGLContextEvent') instanceof window .Event");
205 // shouldBeTrue("document.createEvent('WebGLContextEvent').constructor === w indow.WebGLContextEvent"); 205 // shouldBeTrue("document.createEvent('WebGLContextEvent').constructor === w indow.WebGLContextEvent");
206 206
207 // #if ENABLE(TOUCH_EVENTS)
208 // TouchEvent 207 // TouchEvent
209 // shouldBeTrue("document.createEvent('TouchEvent') instanceof window.TouchE vent"); 208 shouldBeTrue("document.createEvent('TouchEvent') instanceof window.TouchEven t");
210 // shouldBeTrue("document.createEvent('TouchEvent') instanceof window.Event" ); 209 shouldBeTrue("document.createEvent('TouchEvent') instanceof window.Event");
211 // shouldBeTrue("document.createEvent('TouchEvent').constructor === window.T ouchEvent"); 210 shouldBeTrue("document.createEvent('TouchEvent').constructor === window.Touc hEvent");
212 211
213 // #if ENABLE(DEVICE_ORIENTATION)
214 // DeviceMotionEvent 212 // DeviceMotionEvent
215 // shouldBeTrue("document.createEvent('DeviceMotionEvent') instanceof window .DeviceMotionEvent"); 213 // shouldBeTrue("document.createEvent('DeviceMotionEvent') instanceof window .DeviceMotionEvent");
216 // shouldBeTrue("document.createEvent('DeviceMotionEvent') instanceof window .Event"); 214 // shouldBeTrue("document.createEvent('DeviceMotionEvent') instanceof window .Event");
217 // shouldBeTrue("document.createEvent('DeviceMotionEvent').constructor === w indow.DeviceMotionEvent"); 215 // shouldBeTrue("document.createEvent('DeviceMotionEvent').constructor === w indow.DeviceMotionEvent");
218 216
219 // #if ENABLE(DEVICE_ORIENTATION)
220 // DeviceOrientationEvent 217 // DeviceOrientationEvent
221 // shouldBeTrue("document.createEvent('DeviceOrientationEvent') instanceof w indow.DeviceOrientationEvent"); 218 // shouldBeTrue("document.createEvent('DeviceOrientationEvent') instanceof w indow.DeviceOrientationEvent");
222 // shouldBeTrue("document.createEvent('DeviceOrientationEvent') instanceof w indow.Event"); 219 // shouldBeTrue("document.createEvent('DeviceOrientationEvent') instanceof w indow.Event");
223 // shouldBeTrue("document.createEvent('DeviceOrientationEvent').constructor === window.DeviceOrientationEvent"); 220 // shouldBeTrue("document.createEvent('DeviceOrientationEvent').constructor === window.DeviceOrientationEvent");
224 221
225 // #if ENABLE(ORIENTATION_EVENTS)
226 // OrientationEvent (Event alternative) 222 // OrientationEvent (Event alternative)
227 // shouldBeTrue("document.createEvent('OrientationEvent') instanceof window. Event"); 223 // shouldBeTrue("document.createEvent('OrientationEvent') instanceof window. Event");
228 // shouldBeTrue("document.createEvent('OrientationEvent').constructor === wi ndow.Event"); 224 // shouldBeTrue("document.createEvent('OrientationEvent').constructor === wi ndow.Event");
229 225
230 // #if ENABLE(REQUEST_AUTOCOMPLETE)
231 // AutocompleteErrorEvent 226 // AutocompleteErrorEvent
232 // shouldBeTrue("document.createEvent('AutocompleteErrorEvent') instanceof w indow.AutocompleteErrorEvent"); 227 shouldBeTrue("document.createEvent('AutocompleteErrorEvent') instanceof wind ow.AutocompleteErrorEvent");
233 // shouldBeTrue("document.createEvent('AutocompleteErrorEvent') instanceof w indow.Event"); 228 shouldBeTrue("document.createEvent('AutocompleteErrorEvent') instanceof wind ow.Event");
234 // shouldBeTrue("document.createEvent('AutocompleteErrorEvent').constructor === window.AutocompleteErrorEvent"); 229 shouldBeTrue("document.createEvent('AutocompleteErrorEvent').constructor === window.AutocompleteErrorEvent");
235 230
236 // We test both a hard coded set and the automated set below (using enumerat ion) to ensure that a constructor being removed 231 // We test both a hard coded set and the automated set below (using enumerat ion) to ensure that a constructor being removed
237 // from the window is caught a regression. 232 // from the window is caught a regression.
238 233
239 var allEventInterfacesCreateEvents = true; 234 var allEventInterfacesCreateEvents = true;
240 for (var propertyName in window) { 235 for (var propertyName in window) {
241 if (propertyName.match(/Event$/) && window[propertyName].toString().matc h(/EventConstructor\]$/)) { 236 if (propertyName.match(/Event$/) && window[propertyName].toString().matc h(/EventConstructor\]$/)) {
242 try { 237 try {
243 if (!(document.createEvent(propertyName) instanceof window.Event )) { 238 if (!(document.createEvent(propertyName) instanceof window.Event )) {
244 allEventInterfacesCreateEvents = false; 239 allEventInterfacesCreateEvents = false;
(...skipping 25 matching lines...) Expand all
270 } 265 }
271 } 266 }
272 } 267 }
273 shouldBeTrue('allEventInterfacesCreateEvents'); 268 shouldBeTrue('allEventInterfacesCreateEvents');
274 </script> 269 </script>
275 270
276 271
277 272
278 <script src="../js/resources/js-test-post.js"></script> 273 <script src="../js/resources/js-test-post.js"></script>
279 </body> 274 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698