OLD | NEW |
1 description('Test insertAdjacentHTML exceptions to make sure they match HTML5'); | 1 description('Test insertAdjacentHTML exceptions to make sure they match HTML5'); |
2 | 2 |
3 var div = document.createElement("div"); | 3 var div = document.createElement("div"); |
4 | 4 |
5 shouldBeUndefined("div.insertAdjacentHTML('beforeBegin', 'text')"); | 5 shouldBeUndefined("div.insertAdjacentHTML('beforeBegin', 'text')"); |
6 shouldBeUndefined("div.insertAdjacentHTML('afterEnd', 'text')"); | 6 shouldBeUndefined("div.insertAdjacentHTML('afterEnd', 'text')"); |
7 | 7 |
8 shouldThrow("div.insertAdjacentHTML('FOO', 'text')", '"Error: SyntaxError: DOM E
xception 12"'); | 8 shouldThrow("div.insertAdjacentHTML('FOO', 'text')", '"SyntaxError: An invalid o
r illegal string was specified."'); |
9 shouldThrow("document.documentElement.insertAdjacentHTML('afterEnd', 'text')", '
"Error: NoModificationAllowedError: DOM Exception 7"'); | 9 shouldThrow("document.documentElement.insertAdjacentHTML('afterEnd', 'text')", '
"NoModificationAllowedError: An attempt was made to modify an object where modif
ications are not allowed."'); |
OLD | NEW |