OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 | 8 |
9 description('Tests the DOM bindings for the ping attribute'); | 9 description('Tests the DOM bindings for the ping attribute'); |
10 | 10 |
11 var anchor = document.createElement('a'); | 11 var anchor = document.createElement('a'); |
12 shouldBeEqualToString('anchor.ping', ''); | 12 shouldBeEqualToString('anchor.ping', ''); |
13 anchor.setAttribute('ping', 'p1'); | 13 anchor.setAttribute('ping', 'p1'); |
14 shouldBeEqualToString('anchor.ping', 'p1'); | 14 shouldBeEqualToString('anchor.ping', 'p1'); |
15 anchor.ping = 'p2'; | 15 anchor.ping = 'p2'; |
16 shouldBeEqualToString('anchor.getAttribute("ping")', 'p2'); | 16 shouldBeEqualToString('anchor.getAttribute("ping")', 'p2'); |
17 anchor.ping = null; | 17 anchor.ping = null; |
18 shouldBeFalse('anchor.hasAttribute("ping")'); | 18 shouldBeEqualToString('anchor.getAttribute("ping")', 'null'); |
19 shouldBeEqualToString('anchor.ping', ''); | 19 shouldBeEqualToString('anchor.ping', 'null'); |
20 | 20 |
21 var area = document.createElement('area'); | 21 var area = document.createElement('area'); |
22 shouldBeEqualToString('area.ping', ''); | 22 shouldBeEqualToString('area.ping', ''); |
23 area.setAttribute('ping', 'p1'); | 23 area.setAttribute('ping', 'p1'); |
24 shouldBeEqualToString('area.ping', 'p1'); | 24 shouldBeEqualToString('area.ping', 'p1'); |
25 area.ping = 'p2'; | 25 area.ping = 'p2'; |
26 shouldBeEqualToString('area.getAttribute("ping")', 'p2'); | 26 shouldBeEqualToString('area.getAttribute("ping")', 'p2'); |
27 area.ping = null; | 27 area.ping = null; |
28 shouldBeFalse('area.hasAttribute("ping")'); | 28 shouldBeFalse('area.hasAttribute("ping")'); |
29 shouldBeEqualToString('area.ping', ''); | 29 shouldBeEqualToString('area.ping', ''); |
30 | 30 |
31 </script> | 31 </script> |
32 </body> | 32 </body> |
33 </html> | 33 </html> |
OLD | NEW |