Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / keypress-insert-tab.html
blob20ae0ce4d9ee563bd780aff8b5a3cd0596119e84
1 <html>
2 <head>
3 <script>
4 function focusElementAndPressTabKey(el)
6 el.focus();
7 if (window.eventSender)
8 eventSender.keyDown("\t");
11 function test() {
13 if (window.testRunner)
14 testRunner.dumpAsText();
16 var el = document.getElementById('ta');
18 // Test that default setting is to cycle through elements.
19 // This tab key press should not insert a tab.
20 focusElementAndPressTabKey(el);
21 if (el.value != "")
22 return;
24 if (window.testRunner)
25 testRunner.setTabKeyCyclesThroughElements(false);
27 // Test that activating the setting causes a tab character insertion.
28 focusElementAndPressTabKey(el);
29 if (el.value != "\t")
30 return;
32 // Set this preference so the tab key will actually insert a tab character- like in Mail.
33 if (window.testRunner)
34 testRunner.setTabKeyCyclesThroughElements(true);
36 // Test that deactivating the setting prevents a tab insertion.
37 el.value = "";
38 focusElementAndPressTabKey(el);
39 if (el.value != "")
40 return;
42 res.innerHTML = "Test Passed";
44 </script>
45 </head>
47 <body onload="test()">
48 This tests that you can insert a tab in a WebKit app that allows tab insertion<br>
49 <textarea id="ta"></textarea><br>
50 <div id="res">Test Failed</div>
51 </body>
52 </html>