Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / exception-in-binding.html
blob55c8eab14848b87f2b89e7c1c8d285b83997bcf6
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <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) {
9 var stringLike = {
10 toString: function() {
11 throw new Error("error");
14 select.name = stringLike;
17 function setSelectedIndex(select) {
18 var integerLike = {
19 valueOf: function() {
20 throw new Error("error");
23 select.selectedIndex = integerLike;
26 function runTest() {
27 shouldThrow('setName(select)');
28 shouldBe('select.name', '"select"');
30 shouldThrow('setSelectedIndex(select)');
31 shouldBe('select.selectedIndex', '1');
32 finishJSTest();
34 </script>
35 </head>
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>
41 </select>
42 </body>
43 </html>