[email protected] | d24bd38 | 2012-02-11 16:17:52 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
[email protected] | efb08634 | 2013-11-05 00:56:21 | [diff] [blame] | 5 | <script src="../../resources/js-test.js"></script> |
[email protected] | d24bd38 | 2012-02-11 16:17:52 | [diff] [blame] | 6 | </head> |
| 7 | <body> |
| 8 | <script> |
| 9 | |
| 10 | description("Tests that Node.isEqualNode behaves correctly after an element that originally had attributes has had them removed."); |
| 11 | |
| 12 | e1 = document.createElement('span'); |
| 13 | e2 = document.createElement('span'); |
| 14 | |
| 15 | shouldBe("e1.isEqualNode(e2)", "true"); |
| 16 | e2.setAttribute("foo", "bar"); |
| 17 | shouldBe("e1.isEqualNode(e2)", "false"); |
| 18 | e2.removeAttribute("foo"); |
| 19 | shouldBe("e1.isEqualNode(e2)", "true"); |
| 20 | |
| 21 | e1 = document.createElement('span'); |
| 22 | e2 = document.createElement('span'); |
| 23 | |
| 24 | shouldBe("e1.isEqualNode(e2)", "true"); |
| 25 | e1.setAttribute("foo", "bar"); |
| 26 | shouldBe("e1.isEqualNode(e2)", "false"); |
| 27 | e1.removeAttribute("foo"); |
| 28 | shouldBe("e1.isEqualNode(e2)", "true"); |
| 29 | |
| 30 | </script> |
[email protected] | d24bd38 | 2012-02-11 16:17:52 | [diff] [blame] | 31 | </body> |
| 32 | </html> |