88061fa11f3e1d62b4350b7a6ba658551234789b
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / dom / Element / script-tests / attr-param-typechecking.js
1 description(
2 'This test checks whether passing wrong types to setAttributeNode causes a crash.'
3 );
4
5 var element = document.createElement("input");
6
7 shouldThrow('element.setAttributeNode("style");');
8 shouldThrow('element.setAttributeNode(null);');
9 shouldThrow('element.setAttributeNode(undefined);');
10 shouldThrow('element.setAttributeNode(new Object);');
11 shouldThrow('element.removeAttributeNode("style");');
12 shouldThrow('element.removeAttributeNode(null);');
13 shouldThrow('element.removeAttributeNode(undefined);');
14 shouldThrow('element.removeAttributeNode(new Object);');
15 shouldThrow('element.setAttributeNodeNS("style");');
16 shouldThrow('element.setAttributeNodeNS(null);');
17 shouldThrow('element.setAttributeNodeNS(undefined);');
18 shouldThrow('element.setAttributeNodeNS(new Object);');