@@ -47,8 +47,8 @@ public class HTMLDialogElementTest extends WebDriverTestCase {
4747 @ Alerts ({"false" , "null" , "true" , "" , "false" , "null" , "true" , "" ,
4848 "true" , "" , "true" , "TrUE" , "false" , "null" })
4949 public void open () throws Exception {
50- final String html =
51- "<html>\n "
50+ final String html = DOCTYPE_HTML
51+ + "<html>\n "
5252 + " <head>\n "
5353 + " <script>\n "
5454 + LOG_TITLE_FUNCTION
@@ -106,8 +106,8 @@ public void open() throws Exception {
106106 @ Test
107107 @ Alerts ({"false" , "null" , "false" , "null" , "true" , "" , "true" , "blah" , "false" , "null" })
108108 public void openString () throws Exception {
109- final String html =
110- "<html>\n "
109+ final String html = DOCTYPE_HTML
110+ + "<html>\n "
111111 + " <head>\n "
112112 + " <script>\n "
113113 + LOG_TITLE_FUNCTION
@@ -157,8 +157,8 @@ public void openString() throws Exception {
157157 @ Test
158158 @ Alerts ({"false" , "null" , "true" , "" , "true" , "" })
159159 public void show () throws Exception {
160- final String html =
161- "<html>\n "
160+ final String html = DOCTYPE_HTML
161+ + "<html>\n "
162162 + " <head>\n "
163163 + " <script>\n "
164164 + LOG_TITLE_FUNCTION
@@ -200,8 +200,8 @@ public void show() throws Exception {
200200 @ Test
201201 @ Alerts ({"true" , "" , "true" , "" })
202202 public void showAlreadyOpend () throws Exception {
203- final String html =
204- "<html>\n "
203+ final String html = DOCTYPE_HTML
204+ + "<html>\n "
205205 + " <head>\n "
206206 + " <script>\n "
207207 + LOG_TITLE_FUNCTION
@@ -239,8 +239,8 @@ public void showAlreadyOpend() throws Exception {
239239 @ Test
240240 @ Alerts ({"false" , "null" , "true" , "" , "true" , "" })
241241 public void showModal () throws Exception {
242- final String html =
243- "<html>\n "
242+ final String html = DOCTYPE_HTML
243+ + "<html>\n "
244244 + " <head>\n "
245245 + " <script>\n "
246246 + LOG_TITLE_FUNCTION
@@ -284,8 +284,8 @@ public void showModal() throws Exception {
284284 @ Test
285285 @ Alerts ({"true" , "" , "InvalidStateError" , "true" , "" })
286286 public void showModalAlreadyOpend () throws Exception {
287- final String html =
288- "<html>\n "
287+ final String html = DOCTYPE_HTML
288+ + "<html>\n "
289289 + " <head>\n "
290290 + " <script>\n "
291291 + LOG_TITLE_FUNCTION
@@ -325,8 +325,8 @@ public void showModalAlreadyOpend() throws Exception {
325325 @ Test
326326 @ Alerts ({"false" , "null" , "true" , "" , "true" , "" })
327327 public void showAfterShow () throws Exception {
328- final String html =
329- "<html>\n "
328+ final String html = DOCTYPE_HTML
329+ + "<html>\n "
330330 + " <head>\n "
331331 + " <script>\n "
332332 + LOG_TITLE_FUNCTION
@@ -370,8 +370,8 @@ public void showAfterShow() throws Exception {
370370 @ Test
371371 @ Alerts ({"false" , "null" , "true" , "" , "InvalidStateError" , "true" , "" })
372372 public void showAfterShowModal () throws Exception {
373- final String html =
374- "<html>\n "
373+ final String html = DOCTYPE_HTML
374+ + "<html>\n "
375375 + " <head>\n "
376376 + " <script>\n "
377377 + LOG_TITLE_FUNCTION
@@ -415,8 +415,8 @@ public void showAfterShowModal() throws Exception {
415415 @ Test
416416 @ Alerts ({"false" , "null" , "true" , "" , "InvalidStateError" , "true" , "" })
417417 public void showModalAfterShow () throws Exception {
418- final String html =
419- "<html>\n "
418+ final String html = DOCTYPE_HTML
419+ + "<html>\n "
420420 + " <head>\n "
421421 + " <script>\n "
422422 + LOG_TITLE_FUNCTION
@@ -460,8 +460,8 @@ public void showModalAfterShow() throws Exception {
460460 @ Test
461461 @ Alerts ({"false" , "null" , "true" , "" , "true" , "" })
462462 public void showModalAfterShowModal () throws Exception {
463- final String html =
464- "<html>\n "
463+ final String html = DOCTYPE_HTML
464+ + "<html>\n "
465465 + " <head>\n "
466466 + " <script>\n "
467467 + LOG_TITLE_FUNCTION
@@ -507,8 +507,8 @@ public void showModalAfterShowModal() throws Exception {
507507 "false" , "null" , "" , "false" , "null" , "" ,
508508 "[object Event]" , "close" , "false" , "false" , "false" , "[object HTMLDialogElement]" })
509509 public void close () throws Exception {
510- final String html =
511- "<html>\n "
510+ final String html = DOCTYPE_HTML
511+ + "<html>\n "
512512 + " <head>\n "
513513 + " <script>\n "
514514 + LOG_TITLE_FUNCTION
@@ -559,8 +559,8 @@ public void close() throws Exception {
559559 @ Alerts ({"false" , "null" , "" , "true" , "" , "" ,
560560 "false" , "null" , "" , "false" , "null" , "" , "closed" })
561561 public void closeOnclose () throws Exception {
562- final String html =
563- "<html>\n "
562+ final String html = DOCTYPE_HTML
563+ + "<html>\n "
564564 + " <head>\n "
565565 + " <script>\n "
566566 + LOG_TITLE_FUNCTION
@@ -608,8 +608,8 @@ public void closeOnclose() throws Exception {
608608 "false" , "null" , "Html" , "false" , "null" , "Html" ,
609609 "[object Event]" , "close" , "false" , "false" , "false" , "[object HTMLDialogElement]" })
610610 public void closeReturnValue () throws Exception {
611- final String html =
612- "<html>\n "
611+ final String html = DOCTYPE_HTML
612+ + "<html>\n "
613613 + " <head>\n "
614614 + " <script>\n "
615615 + LOG_TITLE_FUNCTION
@@ -660,8 +660,8 @@ public void closeReturnValue() throws Exception {
660660 @ Alerts ({"false" , "" , "1" , "true" , "1" , "2" , "false" , "3" , "4" ,
661661 "[object Event]" , "close" , "false" , "false" , "false" , "[object HTMLDialogElement]" })
662662 public void returnValue () throws Exception {
663- final String html =
664- "<html>\n "
663+ final String html = DOCTYPE_HTML
664+ + "<html>\n "
665665 + " <head>\n "
666666 + " <script>\n "
667667 + LOG_TITLE_FUNCTION
@@ -712,8 +712,8 @@ public void returnValue() throws Exception {
712712 @ Test
713713 @ Alerts ({"false" , "string " , "string null" , "string undefined" , "string 4" , "string [object Object]" })
714714 public void returnValueSpecial () throws Exception {
715- final String html =
716- "<html>\n "
715+ final String html = DOCTYPE_HTML
716+ + "<html>\n "
717717 + " <head>\n "
718718 + " <script>\n "
719719 + LOG_TITLE_FUNCTION
@@ -772,8 +772,8 @@ public void returnValueSpecial() throws Exception {
772772 "[object Event]" , "close" , "false" , "false" , "false" , "[object HTMLDialogElement]" ,
773773 "false" })
774774 public void formClosesDialog () throws Exception {
775- final String html =
776- "<html>\n "
775+ final String html = DOCTYPE_HTML
776+ + "<html>\n "
777777 + " <head>\n "
778778 + " <script>\n "
779779 + LOG_TITLE_FUNCTION
@@ -828,8 +828,8 @@ public void formClosesDialog() throws Exception {
828828 "[object Event]" , "close" , "false" , "false" , "false" , "[object HTMLDialogElement]" ,
829829 "false" })
830830 public void formClosesDialogWithoutJs () throws Exception {
831- final String html =
832- "<html>\n "
831+ final String html = DOCTYPE_HTML
832+ + "<html>\n "
833833 + " <head>\n "
834834 + " <script>\n "
835835 + LOG_TITLE_FUNCTION
@@ -871,8 +871,8 @@ public void formClosesDialogWithoutJs() throws Exception {
871871 @ Test
872872 @ Alerts ({"false" , "true" , "true" })
873873 public void formGet () throws Exception {
874- final String html =
875- "<html>\n "
874+ final String html = DOCTYPE_HTML
875+ + "<html>\n "
876876 + " <head>\n "
877877 + " <script>\n "
878878 + LOG_WINDOW_NAME_FUNCTION
@@ -904,8 +904,8 @@ public void formGet() throws Exception {
904904 + " </body>\n "
905905 + "</html>" ;
906906
907- final String secondContent
908- = "<html><head><title>second</title></head><body>\n "
907+ final String secondContent = DOCTYPE_HTML
908+ + "<html><head><title>second</title></head><body>\n "
909909 + "<p>hello world</p>\n "
910910 + "</body></html>" ;
911911 getMockWebConnection ().setDefaultResponse (secondContent );
@@ -921,8 +921,8 @@ public void formGet() throws Exception {
921921 @ Test
922922 @ Alerts ({"false" , "true" , "true" })
923923 public void formOutsideDialog () throws Exception {
924- final String html =
925- "<html>\n "
924+ final String html = DOCTYPE_HTML
925+ + "<html>\n "
926926 + " <head>\n "
927927 + " <script>\n "
928928 + LOG_TITLE_FUNCTION
@@ -968,8 +968,8 @@ public void formOutsideDialog() throws Exception {
968968 "Show dialog\n Hello World\n Dismiss" , "true" ,
969969 "Show dialog" , "false" })
970970 public void useCaseIssue598 () throws Exception {
971- final String html =
972- "<html>\n "
971+ final String html = DOCTYPE_HTML
972+ + "<html>\n "
973973 + " <body>\n "
974974 + " <button id='showMyDialog'>Show dialog</button><br/>\n "
975975 + " <dialog id='mydialog'>\n "
0 commit comments