Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/ping-attribute-dom-binding.html

Issue 1416043002: Revert "Use DOMSettableTokenList for {HTMLAnchorElement, HTMLAreaElement}.ping." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 shouldBe('anchor.ping', '[]'); 12 shouldBeEqualToString('anchor.ping', '');
13 anchor.setAttribute('ping', 'p1'); 13 anchor.setAttribute('ping', 'p1');
14 shouldBe('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.add('p3');
18 shouldBe('anchor.ping', '["p2","p3"]');
19 anchor.ping.add('p3');
20 shouldBe('anchor.ping', '["p2","p3"]');
21 shouldBeTrue('anchor.ping.contains("p3")');
22 anchor.ping.remove('p2');
23 shouldBe('anchor.ping', '["p3"]');
24 anchor.ping = null; 17 anchor.ping = null;
25 shouldBeEqualToString('anchor.getAttribute("ping")', 'null'); 18 shouldBeEqualToString('anchor.getAttribute("ping")', 'null');
26 shouldBe('anchor.ping', '["null"]'); 19 shouldBeEqualToString('anchor.ping', 'null');
27 20
28 var area = document.createElement('area'); 21 var area = document.createElement('area');
29 shouldBe('area.ping', '[]'); 22 shouldBeEqualToString('area.ping', '');
30 area.setAttribute('ping', 'p1'); 23 area.setAttribute('ping', 'p1');
31 shouldBe('area.ping', '["p1"]'); 24 shouldBeEqualToString('area.ping', 'p1');
32 area.ping = 'p2'; 25 area.ping = 'p2';
33 shouldBeEqualToString('area.getAttribute("ping")', 'p2'); 26 shouldBeEqualToString('area.getAttribute("ping")', 'p2');
34 area.ping.add('p3');
35 shouldBe('area.ping', '["p2","p3"]');
36 area.ping.add('p3');
37 shouldBe('area.ping', '["p2","p3"]');
38 shouldBeTrue('area.ping.contains("p3")');
39 area.ping.remove('p2');
40 shouldBe('area.ping', '["p3"]');
41 area.ping = null; 27 area.ping = null;
42 shouldBeEqualToString('area.getAttribute("ping")', 'null'); 28 shouldBeEqualToString('area.getAttribute("ping")', 'null');
43 shouldBe('area.ping', '["null"]'); 29 shouldBeEqualToString('area.ping', 'null');
44 30
45 </script> 31 </script>
46 </body> 32 </body>
47 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698