4 <script src=
"../../resources/js-test.js"></script>
6 description("Tests to ensure that attributes are not set when an exceptions is raised while converting argument to JSValue.");
7 window
.jsTestIsAsync
= true;
8 function setName(select
) {
10 toString: function() {
11 throw new Error("error");
14 select
.name
= stringLike
;
17 function setSelectedIndex(select
) {
20 throw new Error("error");
23 select
.selectedIndex
= integerLike
;
27 shouldThrow('setName(select)');
28 shouldBe('select.name', '"select"');
30 shouldThrow('setSelectedIndex(select)');
31 shouldBe('select.selectedIndex', '1');
36 <body onload=
"runTest()">
37 <select id=
"select" name=
"select">
38 <option value=
"value1">Value
1</option>
39 <option value=
"value2" selected
>Value
2</option>
40 <option value=
"value3">Value
3</option>