| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <meta charset="utf-8"> | 2 <meta charset="utf-8"> |
| 3 <title></title> | 3 <title></title> |
| 4 <script src="../../../../resources/testharness.js"></script> | 4 <script src="/resources/testharness.js"></script> |
| 5 <script src="../../../../resources/testharnessreport.js"></script> | 5 <script src="/resources/testharnessreport.js"></script> |
| 6 <body> | 6 <body> |
| 7 | 7 |
| 8 <button></button> | 8 <button></button> |
| 9 <div id="foo"></div> | 9 <div id="foo"></div> |
| 10 <p data-foo=""></p> | 10 <p data-foo=""></p> |
| 11 | 11 |
| 12 <script> | 12 <script> |
| 13 test(function() { | 13 test(function() { |
| 14 var buttonElement = document.getElementsByTagName('button')[0]; | 14 var buttonElement = document.getElementsByTagName('button')[0]; |
| 15 assert_equals(buttonElement.hasAttributes(), false, 'hasAttributes() on empt
y element must return false.'); | 15 assert_equals(buttonElement.hasAttributes(), false, 'hasAttributes() on empt
y element must return false.'); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 31 assert_equals(pWithCustomAttr.hasAttributes(), true, 'hasAttributes() on ele
ment with custom attribute must return true.'); | 31 assert_equals(pWithCustomAttr.hasAttributes(), true, 'hasAttributes() on ele
ment with custom attribute must return true.'); |
| 32 | 32 |
| 33 var divWithCustomAttr = document.createElement('div'); | 33 var divWithCustomAttr = document.createElement('div'); |
| 34 divWithCustomAttr.setAttribute('data-custom', 'foo'); | 34 divWithCustomAttr.setAttribute('data-custom', 'foo'); |
| 35 assert_equals(divWithCustomAttr.hasAttributes(), true, 'hasAttributes() on d
ynamically created element with custom attribute must return true.'); | 35 assert_equals(divWithCustomAttr.hasAttributes(), true, 'hasAttributes() on d
ynamically created element with custom attribute must return true.'); |
| 36 | 36 |
| 37 }, 'element.hasAttributes() must return true when the element has attribute.'); | 37 }, 'element.hasAttributes() must return true when the element has attribute.'); |
| 38 | 38 |
| 39 </script> | 39 </script> |
| 40 </body> | 40 </body> |
| OLD | NEW |