| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <script src="script-tests/document-title-get.js"></script> | 7 <script> |
| 8 description("This test checks the implementation of getting the document.title a
ttribute."); |
| 9 |
| 10 debug('Test with no title set'); |
| 11 shouldBeEqualToString("document.title", ""); |
| 12 |
| 13 debug('Test with empty title'); |
| 14 document.title = ""; |
| 15 shouldBeEqualToString("document.title",""); |
| 16 |
| 17 debug('Test with only whitespace'); |
| 18 document.title = "\t\n\r \r \t\n\n"; |
| 19 shouldBeEqualToString("document.title",""); |
| 20 |
| 21 debug('Test with no whitespace'); |
| 22 document.title = "nowhitespacetitle"; |
| 23 shouldBeEqualToString("document.title","nowhitespacetitle"); |
| 24 |
| 25 debug('Test with whitespace'); |
| 26 document.title = "\u0009\u000aone\u000b\u000cspace\u000d\u0020"; |
| 27 shouldBeEqualToString("document.title","one\u000b space"); |
| 28 |
| 29 debug('Test with various whitespace lengths and fields'); |
| 30 document.title = " lots of \r whitespace and \n\n\n \t newlines \t"; |
| 31 shouldBeEqualToString("document.title", "lots of whitespace and newlines"); |
| 32 |
| 33 debug('Test with various length strings'); |
| 34 </script> |
| 8 </body> | 35 </body> |
| 9 </html> | 36 </html> |
| OLD | NEW |