Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | |
michael@0 | 4 | <head> |
michael@0 | 5 | <title>Test for titles</title> |
michael@0 | 6 | <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 7 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
michael@0 | 8 | <style type="text/css"> |
michael@0 | 9 | </style> |
michael@0 | 10 | </head> |
michael@0 | 11 | |
michael@0 | 12 | <body onload="runTests()"> |
michael@0 | 13 | |
michael@0 | 14 | <p id="display"></p> |
michael@0 | 15 | <div style="display:none;"> |
michael@0 | 16 | <iframe id="html1" src="data:text/html,<html><head><title id='t'>Test</title></head></html>"></iframe> |
michael@0 | 17 | <iframe id="html2" src="data:text/html,<html><head><title id='t'>Test</title><title>Foo</title></head></html>"></iframe> |
michael@0 | 18 | <iframe id="html3" src="data:text/html,<html></html>"></iframe> |
michael@0 | 19 | <iframe id="xhtml1" src="data:text/xml,<html xmlns='http://www.w3.org/1999/xhtml'><body><title id='t'>Test</title></body></html>"></iframe> |
michael@0 | 20 | <iframe id="xhtml2" src="data:text/xml,<title xmlns='http://www.w3.org/1999/xhtml'>Test</title>"></iframe> |
michael@0 | 21 | <iframe id="xhtml3" src="data:text/xml,<title xmlns='http://www.w3.org/1999/xhtml'>Te<div>bogus</div>st</title>"></iframe> |
michael@0 | 22 | <iframe id="xhtml4" src="data:text/xml,<html xmlns='http://www.w3.org/1999/xhtml'/>"></iframe> |
michael@0 | 23 | <iframe id="xhtml5" src="data:text/xml,<html xmlns='http://www.w3.org/1999/xhtml'><head/></html>"></iframe> |
michael@0 | 24 | <iframe id="xhtml6" src="data:text/xml,<html xmlns='http://www.w3.org/1999/xhtml'><head><style/></head></html>"></iframe> |
michael@0 | 25 | <iframe id="xul1" src="data:application/vnd.mozilla.xul+xml,<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' title='Test'/>"></iframe> |
michael@0 | 26 | <iframe id="xul2" src="data:application/vnd.mozilla.xul+xml,<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul' title='Test'/>"></iframe> |
michael@0 | 27 | <iframe id="svg1" src="data:text/xml,<svg xmlns='http://www.w3.org/2000/svg'><title id='t'>Test</title></svg>"></iframe> |
michael@0 | 28 | <iframe id="svg2" src="data:text/xml,<svg xmlns='http://www.w3.org/2000/svg'><title id='t'>Test</title></svg>"></iframe> |
michael@0 | 29 | </div> |
michael@0 | 30 | |
michael@0 | 31 | <pre id="test"> |
michael@0 | 32 | <script> |
michael@0 | 33 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 34 | |
michael@0 | 35 | function runTests() { |
michael@0 | 36 | function testStatic(id, expect, description) { |
michael@0 | 37 | is(document.getElementById(id).contentDocument.title, expect, description); |
michael@0 | 38 | } |
michael@0 | 39 | |
michael@0 | 40 | testStatic("html1", "Test", "HTML <title>"); |
michael@0 | 41 | testStatic("html2", "Test", "choose the first HTML <title>"); |
michael@0 | 42 | testStatic("html3", "", "No title"); |
michael@0 | 43 | testStatic("xhtml1", "Test", "XHTML <title> in body"); |
michael@0 | 44 | testStatic("xhtml2", "Test", "XHTML <title> as root element"); |
michael@0 | 45 | testStatic("xhtml3", "Test", "XHTML <title> containing an element"); |
michael@0 | 46 | testStatic("xul1", "Test", "XUL <window> title attribute"); |
michael@0 | 47 | testStatic("svg1", "Test", "SVG <title>"); |
michael@0 | 48 | |
michael@0 | 49 | SimpleTest.finish(); |
michael@0 | 50 | } |
michael@0 | 51 | </script> |
michael@0 | 52 | </pre> |
michael@0 | 53 | </body> |
michael@0 | 54 | </html> |