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

Side by Side Diff: LayoutTests/fast/events/script-tests/init-events.js

Issue 20034002: Add support for KeyboardEvent.location attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nits Created 7 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 | Annotate | Revision Log
OLDNEW
1 description("This tests the init functions for all the event DOM classes that ha ve them."); 1 description("This tests the init functions for all the event DOM classes that ha ve them.");
2 2
3 function createEventHelper(prefix) 3 function createEventHelper(prefix)
4 { 4 {
5 var event = document.createEvent(prefix + "Event"); 5 var event = document.createEvent(prefix + "Event");
6 return event; 6 return event;
7 } 7 }
8 8
9 function testInitEvent(prefix, argumentString) 9 function testInitEvent(prefix, argumentString)
10 { 10 {
(...skipping 17 matching lines...) Expand all
28 shouldBe("testInitEvent('Keyboard', '\"a\", false, false, window, \"b\", 1001, f alse, false, false, false, false').type", "'a'"); 28 shouldBe("testInitEvent('Keyboard', '\"a\", false, false, window, \"b\", 1001, f alse, false, false, false, false').type", "'a'");
29 shouldBe("testInitEvent('Keyboard', 'null, false, false, window, \"b\", 1001, fa lse, false, false, false, false').type", "'null'"); 29 shouldBe("testInitEvent('Keyboard', 'null, false, false, window, \"b\", 1001, fa lse, false, false, false, false').type", "'null'");
30 shouldBe("testInitEvent('Keyboard', '\"a\", false, false, window, \"b\", 1001, f alse, false, false, false, false').bubbles", "false"); 30 shouldBe("testInitEvent('Keyboard', '\"a\", false, false, window, \"b\", 1001, f alse, false, false, false, false').bubbles", "false");
31 shouldBe("testInitEvent('Keyboard', '\"a\", true, false, window, \"b\", 1001, fa lse, false, false, false, false').bubbles", "true"); 31 shouldBe("testInitEvent('Keyboard', '\"a\", true, false, window, \"b\", 1001, fa lse, false, false, false, false').bubbles", "true");
32 shouldBe("testInitEvent('Keyboard', '\"a\", false, false, window, \"b\", 1001, f alse, false, false, false, false').cancelable", "false"); 32 shouldBe("testInitEvent('Keyboard', '\"a\", false, false, window, \"b\", 1001, f alse, false, false, false, false').cancelable", "false");
33 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').cancelable", "true"); 33 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').cancelable", "true");
34 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').view", "window"); 34 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').view", "window");
35 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, null, \"b\", 1001, fals e, false, false, false, false').view", "null"); 35 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, null, \"b\", 1001, fals e, false, false, false, false').view", "null");
36 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').keyIdentifier", "'b'"); 36 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').keyIdentifier", "'b'");
37 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, null, 1001, fal se, false, false, false, false').keyIdentifier", "'null'"); 37 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, null, 1001, fal se, false, false, false, false').keyIdentifier", "'null'");
38 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').keyLocation", "1001"); 38 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').location", "1001");
39 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').ctrlKey", "false"); 39 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').ctrlKey", "false");
40 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, tr ue, false, false, false, false').ctrlKey", "true"); 40 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, tr ue, false, false, false, false').ctrlKey", "true");
41 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').altKey", "false"); 41 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').altKey", "false");
42 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, true, false, false, false').altKey", "true"); 42 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, true, false, false, false').altKey", "true");
43 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').shiftKey", "false"); 43 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').shiftKey", "false");
44 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, true, false, false').shiftKey", "true"); 44 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, true, false, false').shiftKey", "true");
45 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').metaKey", "false"); 45 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').metaKey", "false");
46 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, true, false').metaKey", "true"); 46 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, true, false').metaKey", "true");
47 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').altGraphKey", "false"); 47 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, false').altGraphKey", "false");
48 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, true').altGraphKey", "true"); 48 shouldBe("testInitEvent('Keyboard', '\"a\", false, true, window, \"b\", 1001, fa lse, false, false, false, true').altGraphKey", "true");
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').detail", "100 1"); 175 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').detail", "100 1");
176 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').keyCode", "0" ); 176 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').keyCode", "0" );
177 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').charCode", "0 "); 177 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').charCode", "0 ");
178 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').layerX", "0") ; 178 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').layerX", "0") ;
179 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').layerY", "0") ; 179 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').layerY", "0") ;
180 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').pageX", "0"); 180 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').pageX", "0");
181 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').pageY", "0"); 181 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').pageY", "0");
182 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').which", "0"); 182 shouldBe("testInitEvent('UI', '\"a\", false, false, window, 1001').which", "0");
183 183
184 // WheelEvent has no init function yet; roughly speaking, we are waiting for tha t part of DOM 3 to stabilize. 184 // WheelEvent has no init function yet; roughly speaking, we are waiting for tha t part of DOM 3 to stabilize.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698