Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / selector-set-attribute.html
blob20b3d4485065f37ce0dd5c364db6369d082e8c9a
1 <html>
2 <head>
3 <title>setAttribute() Test</title>
5 <style type="text/css" title="text/css">
7 p { display:none; color: red; }
8 p[title] { display:block; color: green; }
9 p[id] { display:block; color: green; }
10 p[class] { display:block; color: green; }
11 p[lang] { display:block; color: green; }
13 </style>
15 <script type="text/javascript">
16 window.onload = init;
18 function init()
20 document.getElementsByTagName('p')[0].setAttribute('class','test');
21 document.getElementsByTagName('p')[1].setAttribute('id','test');
22 document.getElementsByTagName('p')[2].setAttribute('title','This is a test');
23 document.getElementsByTagName('p')[4].setAttribute('lang','en');
25 </script>
27 </head>
28 <body>
29 <h1>setAttribute() Test</h1>
30 <p>
31 This element's Class attribute is set using setAttribute(). It should be green.
32 </p>
33 <p>
34 This element's ID attribute is set using setAttribute(). It should be green.
35 </p>
36 <p>
37 This element's Title attribute is set using setAttribute(). It should be green.
38 </p>
39 <p title="This is hard-coded">
40 This element's Title attribute is hard-coded. It should be green.
41 </p>
42 <p>
43 This element's Lang attribute is set using setAttribute(). It should be green.
44 </p>
45 </body>
46 </html>