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

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

Issue 58493002: Remove TreatNullAs=NullString for HTMLAnchorElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix tests Created 7 years, 1 month 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 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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698