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

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

Issue 1235603003: Use DOMSettableTokenList for {HTMLAnchorElement, HTMLAreaElement}.ping. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase it(2). 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 shouldBeEqualToString('anchor.ping', ''); 12 shouldBe('anchor.ping', '[]');
13 anchor.setAttribute('ping', 'p1'); 13 anchor.setAttribute('ping', 'p1');
14 shouldBeEqualToString('anchor.ping', 'p1'); 14 shouldBe('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 shouldBeTrue('anchor.ping.contains("p3")');
20 anchor.ping.remove('p2');
21 shouldBe('anchor.ping', '["p3"]');
17 anchor.ping = null; 22 anchor.ping = null;
18 shouldBeEqualToString('anchor.getAttribute("ping")', 'null'); 23 shouldBeEqualToString('anchor.getAttribute("ping")', 'null');
19 shouldBeEqualToString('anchor.ping', 'null'); 24 shouldBe('anchor.ping', '["null"]');
20 25
21 var area = document.createElement('area'); 26 var area = document.createElement('area');
22 shouldBeEqualToString('area.ping', ''); 27 shouldBe('area.ping', '[]');
23 area.setAttribute('ping', 'p1'); 28 area.setAttribute('ping', 'p1');
24 shouldBeEqualToString('area.ping', 'p1'); 29 shouldBe('area.ping', '["p1"]');
25 area.ping = 'p2'; 30 area.ping = 'p2';
26 shouldBeEqualToString('area.getAttribute("ping")', 'p2'); 31 shouldBeEqualToString('area.getAttribute("ping")', 'p2');
32 area.ping.add('p3');
33 shouldBe('area.ping', '["p2","p3"]');
34 shouldBeTrue('area.ping.contains("p3")');
35 area.ping.remove('p2');
36 shouldBe('area.ping', '["p3"]');
27 area.ping = null; 37 area.ping = null;
28 shouldBeEqualToString('area.getAttribute("ping")', 'null'); 38 shouldBeEqualToString('area.getAttribute("ping")', 'null');
29 shouldBeEqualToString('area.ping', 'null'); 39 shouldBe('area.ping', '["null"]');
30 40
31 </script> 41 </script>
32 </body> 42 </body>
33 </html> 43 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698