2 <embed name="plg" type="application/x-webkit-test-netscape"></embed>
3 <div id="getter">FAILURE: No exception caught on getting.</div>
4 <div id="setter">FAILURE: No exception caught on setting.</div>
5 <em>One could expect exceptions to be raised in the below cases, too - but Firefox doesn't
6 do that in most of these (I do get an exception in the first case, but that's inconsistent with not
7 getting it in the seconfd one).</em>
8 <div id="getter2">No exception caught on getting via testCallback.</div>
9 <div id="setter2">No exception caught on setting via testCallback.</div>
10 <div id="getter3">No exception caught on getting via testGetBrowserProperty.</div>
11 <div id="setter3">No exception caught on setting via testSetBrowserProperty.</div>
13 if (window.layoutTestController)
14 layoutTestController.dumpAsText();
16 var plg = document.getElementsByName("plg")[0];
18 // Firefox sometimes behaves inconsistently, leaving an exception dangling until the next call.
19 function sanityCheckExceptionState(logTarget)
24 document.getElementById(logTarget).innerHTML += " Huh? Exception raised later!";
29 plg.testThrowExceptionProperty;
31 document.getElementById('getter').innerHTML = 'SUCCESS: Exception caught: ' + e;
33 sanityCheckExceptionState("getter");
36 plg.testThrowExceptionProperty = "";
38 document.getElementById('setter').innerHTML = 'SUCCESS: Exception caught: ' + e;
40 sanityCheckExceptionState("setter");
43 plg.testEvaluate("plg.testThrowExceptionProperty");
45 document.getElementById('getter2').innerHTML = 'Exception caught: ' + e;
47 sanityCheckExceptionState("getter2");
50 plg.testEvaluate("plg.testThrowExceptionProperty = 0");
52 document.getElementById('setter2').innerHTML = 'Exception caught: ' + e;
54 sanityCheckExceptionState("setter2");
57 plg.testGetBrowserProperty(plg, "testThrowExceptionProperty");
59 document.getElementById('getter3').innerHTML = 'Exception caught: ' + e;
61 sanityCheckExceptionState("getter3");
64 plg.testSetBrowserProperty(plg, "testThrowExceptionProperty", 0);
66 document.getElementById('setter3').innerHTML = 'Exception caught: ' + e;
68 sanityCheckExceptionState("setter3");