summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/syntax/escapes-016.xht
blob: 128c74a1d1a68b48646cc4558b66f29face33e61 (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

 <head>

  <title>CSS Test: Escape of non-printable characters within declarations, applying to property values</title>

  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
  <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#rule-sets" title="4.1.7 Rule sets, declaration blocks, and selectors" />
  <link rel="match" href="../reference/ref-if-there-is-no-red.xht" />

  <meta content="invalid" name="flags" />
  <meta content="red is a reserved (color name) keyword while red\9 is not a reserved keyword. red\9 is made of red with an escaped horizontal tab. That is why the parsing of the declaration should fail. Same thing with the other 23 tests (see test escapes-015)." name="assert" />

  <!--
  This test is a much more elaborated version of the test
  http://test.csswg.org/suites/css2.1/nightly-unstable/html4/escapes-002.htm
  and
  http://test.csswg.org/suites/css2.1/nightly-unstable/html4/escapes-014.htm
  -->

  <style type="text/css"><![CDATA[
  div
  {
  color: white;
  font-size: 1.25em;
  line-height: 1.2;
  }

  /*
  U+0009 is an horizontal tab
  U+000A is a line feed
  U+000B is a vertical tab
  U+000C is a form feed
  U+000D is a carriage return
  U+0020 is a blank white space
  */

  div#thirteenth
  {
  color: \9 red;
  }

  div#fourteenth
  {
  color: \9red;
  }

  div#fifteenth
  {
  color: \A red;
  }

  div#sixteenth
  {
  color: \Ared;
  }

  div#seventeenth
  {
  color: \B red;
  }

  div#eighteenth
  {
  color: \Bred;
  }

  /*
  U+0009 is an horizontal tab
  U+000A is a line feed
  U+000B is a vertical tab
  U+000C is a form feed
  U+000D is a carriage return
  U+0020 is a blank white space
  */

  div#nineteenth
  {
  color: \C red;
  }

  div#twentieth
  {
  color: \Cred;
  }

  div#twenty-first
  {
  color: \D red;
  }

  div#twenty-second
  {
  color: \Dred;
  }

  div#twenty-third
  {
  color: \20 red;
  }

  div#twenty-fourth
  {
  color: \20red;
  }

  /*
  U+0009 is an horizontal tab
  U+000A is a line feed
  U+000B is a vertical tab
  U+000C is a form feed
  U+000D is a carriage return
  U+0020 is a blank white space
  */

  ]]></style>

 </head>

 <body>

  <p>Test passes if there is <strong>no red</strong>.</p>

  <div id="thirteenth">13th test FAILED</div>

  <div id="fourteenth">14th test FAILED</div>

  <div id="fifteenth">15th test FAILED</div>

  <div id="sixteenth">16th test FAILED</div>

  <div id="seventeenth">17th test FAILED</div>

  <div id="eighteenth">18th test FAILED</div>

  <div id="nineteenth">19th test FAILED</div>

  <div id="twentieth">20th test FAILED</div>

  <div id="twenty-first">21st test FAILED</div>

  <div id="twenty-second">22nd test FAILED</div>

  <div id="twenty-third">23rd test FAILED</div>

  <div id="twenty-fourth">24th test FAILED</div>

 </body>
</html>