Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: LayoutTests/plugins/netscape-plugin-property-access-exception.html

Issue 1319473007: Delete a bunch of NPAPI layout tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html><body>
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 Firef ox doesn't
6 do that in most of these (I do get an exception in the first case, but that's in consistent 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.</di v>
11 <div id="setter3">No exception caught on setting via testSetBrowserProperty.</di v>
12 <script>
13 if (window.testRunner)
14 testRunner.dumpAsText();
15
16 var plg = document.getElementsByName("plg")[0];
17
18 // Firefox sometimes behaves inconsistently, leaving an exception dangling u ntil the next call.
19 function sanityCheckExceptionState(logTarget)
20 {
21 try {
22 plg.testEvaluate("");
23 } catch (e) {
24 document.getElementById(logTarget).innerHTML += " Huh? Exception rai sed later!";
25 }
26 }
27
28 try {
29 plg.testThrowExceptionProperty;
30 } catch (e) {
31 document.getElementById('getter').innerHTML = 'SUCCESS: Exception caught : ' + e;
32 }
33 sanityCheckExceptionState("getter");
34
35 try {
36 plg.testThrowExceptionProperty = "";
37 } catch (e) {
38 document.getElementById('setter').innerHTML = 'SUCCESS: Exception caught : ' + e;
39 }
40 sanityCheckExceptionState("setter");
41
42 try {
43 plg.testEvaluate("plg.testThrowExceptionProperty");
44 } catch (e) {
45 document.getElementById('getter2').innerHTML = 'Exception caught: ' + e;
46 }
47 sanityCheckExceptionState("getter2");
48
49 try {
50 plg.testEvaluate("plg.testThrowExceptionProperty = 0");
51 } catch (e) {
52 document.getElementById('setter2').innerHTML = 'Exception caught: ' + e;
53 }
54 sanityCheckExceptionState("setter2");
55
56 try {
57 plg.testGetBrowserProperty(plg, "testThrowExceptionProperty");
58 } catch (e) {
59 document.getElementById('getter3').innerHTML = 'Exception caught: ' + e;
60 }
61 sanityCheckExceptionState("getter3");
62
63 try {
64 plg.testSetBrowserProperty(plg, "testThrowExceptionProperty", 0);
65 } catch (e) {
66 document.getElementById('setter3').innerHTML = 'Exception caught: ' + e;
67 }
68 sanityCheckExceptionState("setter3");
69 </script>
70 </body>
71 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698