Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / formaction-attribute.html
blob3807dada12791671dfbc55ad71d3668c5a89e3d5
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script src="resources/common.js"></script>
6 </head>
7 <body>
8 <p id="description"></p>
9 <div id="console"></div>
10 <form action="javascript: failTest(this)" method="get">
11 <input id="button1" type="submit" formaction="javascript: passTest1(this)" />
12 <button id="button2" type="submit" formaction="javascript: passTest2(this)" />
13 <button type="submit" formaction="javascript: passTest3(this)">
14 <span id="span" formaction="javascript: failTest2(this)">submit</span>
15 </button>
16 </form>
17 <script>
18 description("Test for formaction attributes in input and button tags.");
19 var doneAction = false;
21 function failTest(ul)
23 doneAction = true;
24 testFailed('The formaction attribute in the input or button tag was ignored.');
26 function failTest2(ul)
28 doneAction = true;
29 testFailed('The formaction attribute in the span tag was used.');
31 function passTest1(ul)
33 doneAction = true;
34 testPassed('The formaction attribute in the input tag was used.');
36 function passTest2(ul)
38 doneAction = true;
39 testPassed('The formaction attribute in the button tag was used.');
41 function passTest3(ul)
43 doneAction = true;
44 testPassed('The formaction attribute in the button tag was used.');
47 doneAction = false;
48 var input = document.getElementById('button1');
49 input.click();
50 if (!doneAction)
51 testFailed('Both of the action and the formaction attributes were ignored.');
52 doneAction = false;
53 clickElement(input);
54 if (!doneAction)
55 testFailed('Both of the action and the formaction attributes were ignored.');
57 doneAction = false;
58 var button = document.getElementById('button2');
59 button.click();
60 if (!doneAction)
61 testFailed('Both of the action and the formaction attributes were ignored.');
63 doneAction = false;
64 var span = document.getElementById('span');
65 span.click();
66 if (!doneAction)
67 testFailed('Both of the action and the formaction attributes were ignored.');
68 </script>
69 </body>
70 </html>