summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/ext-xhtml-pubid/the-xhtml-syntax/parsing-xhtml-documents/xhtml-pubid-1.html
blob: f73de750dd60da0ba97db0a361a36594cf92d64c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "xhtml-local.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>XHTML Doctype test 1</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<h1>XHTML Doctype test 1</h1>

<div id="log" style="display:block"></div>


<iframe id="xhtml1" src="xhtml-pubid-1.xhtml" onload="t1()"></iframe><br/>
<iframe id="xhtml2" src="xhtml-pubid-2.xhtml" onload="t2()"></iframe><br/>
<iframe id="xhtml3" src="xhtml-pubid-3.xhtml" onload="t3()"></iframe>

<script>




function  t1 () {
var txt;
try{
txt = window.frames[0].document.getElementById("sqrt").firstChild.nodeValue;
} catch (e) {
txt=null;
}
test(function() {
assert_equals(txt,'\u221a');
},"Sqrt entity is U+221a with legacy DTD");

try{
txt = window.frames[0].document.getElementById("lang").firstChild.nodeValue;
} catch (e) {
txt=null;
}
test(function() {
assert_equals(txt,'\u27e8');
},"lang entity is U+27E8 not U+2329 with legacy DTD");
}

function t2 () {
var txt2;
try{
txt2 = window.frames[1].document.getElementById("nbsp").firstChild.nodeValue;
} catch (e) {
txt2=null;
}
test(function() {
assert_object_equals(txt2,null);
},"nbsp should not be recognised without known PUBLIC identifier");
}

function t3 () {
var txt3;
try{
txt3 = window.frames[2].document.getElementById("sqrt").firstChild.nodeValue;
} catch (e) {
txt3=null;
}
test(function() {
assert_equals(txt3,'\u221a');
},"Sqrt entity is U+221a with XHTML PUBID Extension spec");

try{
txt3 = window.frames[2].document.getElementById("lang").firstChild.nodeValue;
} catch (e) {
txt3=null;
}
test(function() {
assert_equals(txt3,'\u27e8');
},"lang entity is U+27E8 with XHTML PUBID Extension spec");
}



</script>

</body>
</html>