Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
michael@0 | 1 | <html xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 2 | <head> |
michael@0 | 3 | <title>Test for base URIs</title> |
michael@0 | 4 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 5 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 6 | <base href="/tests/content/base/" /> |
michael@0 | 7 | <style> |
michael@0 | 8 | #bound { -moz-binding: url("test/file_base_xbl.xml#test"); } |
michael@0 | 9 | </style> |
michael@0 | 10 | </head> |
michael@0 | 11 | <body> |
michael@0 | 12 | <div id="1" xml:base="supercalifragilisticexpialidocious"><p><p xml:base="hello/"><p xml:base="world"><span xml:base="#iamtheverymodelofamodernmajorgeneral">text</span></p></p></p></div> |
michael@0 | 13 | <div id="bound"/> |
michael@0 | 14 | <pre id="test"> |
michael@0 | 15 | <script type="application/javascript"> |
michael@0 | 16 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 17 | addLoadEvent(function() { |
michael@0 | 18 | is(document.baseURI, "http://mochi.test:8888/tests/content/base/", |
michael@0 | 19 | "document base"); |
michael@0 | 20 | is(document.body.baseURI, "http://mochi.test:8888/tests/content/base/", |
michael@0 | 21 | "body base"); |
michael@0 | 22 | |
michael@0 | 23 | var expected = |
michael@0 | 24 | ["http://mochi.test:8888/tests/content/base/supercalifragilisticexpialidocious", |
michael@0 | 25 | "http://mochi.test:8888/tests/content/base/supercalifragilisticexpialidocious", |
michael@0 | 26 | "http://mochi.test:8888/tests/content/base/hello/", |
michael@0 | 27 | "http://mochi.test:8888/tests/content/base/hello/world", |
michael@0 | 28 | "http://mochi.test:8888/tests/content/base/hello/world#iamtheverymodelofamodernmajorgeneral", |
michael@0 | 29 | "http://mochi.test:8888/tests/content/base/hello/world#iamtheverymodelofamodernmajorgeneral", |
michael@0 | 30 | ]; |
michael@0 | 31 | var node = document.getElementById("1"); |
michael@0 | 32 | while(node) { |
michael@0 | 33 | is(node.baseURI, expected.shift(), "node base"); |
michael@0 | 34 | node = node.firstChild; |
michael@0 | 35 | } |
michael@0 | 36 | is(expected.length, 0, "found all expected nodes"); |
michael@0 | 37 | |
michael@0 | 38 | var svgExpected = |
michael@0 | 39 | ["http://mochi.test:8888/tests/content/base/test/file_base_xbl.xml", |
michael@0 | 40 | "http://mochi.test:8888/tests/content/base/test/file_base_xbl.xml", |
michael@0 | 41 | "http://mochi.test:8888/tests/content/base/test/file_base_xbl.xml#shesellsseashellsbytheseashore", |
michael@0 | 42 | ]; |
michael@0 | 43 | node = SpecialPowers.wrap(document).getAnonymousNodes(document.getElementById("bound"))[0]; |
michael@0 | 44 | while(node) { |
michael@0 | 45 | is(node.baseURI, svgExpected.shift(), "node base"); |
michael@0 | 46 | node = node.firstChild; |
michael@0 | 47 | } |
michael@0 | 48 | is(svgExpected.length, 0, "found all expected nodes"); |
michael@0 | 49 | |
michael@0 | 50 | SimpleTest.finish(); |
michael@0 | 51 | }); |
michael@0 | 52 | </script> |
michael@0 | 53 | </pre> |
michael@0 | 54 | </body> |
michael@0 | 55 | </html> |