JS Test Harness: Remove successfullyParsed from more tests
[WebKit-https.git] / LayoutTests / java / lc3 / JSObject / ToDouble-002-n.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../../../fast/js/resources/js-test-pre.js"></script>
6 <script>
7 if (window.layoutTestController) {
8     layoutTestController.overridePreference("WebKitJavaEnabled", "1");
9     layoutTestController.waitUntilDone();
10 }
11 </script>
12 </head>
13 <body onload="onload()">
14
15 <div id="console"></div>
16
17 <object
18   classid="clsid:CAFEEFAC-0015-0000-0000-ABCDEFFEDCBA"
19   width=500
20   height=200
21   <param name="codebase" value="../../../java">
22   <param name="code" value="lc3.class">
23   <param name="archive" value="jstests.jar">
24   <comment>
25     <embed
26       code="lc3.class"
27       codebase="../../../java"
28       archive="jstests.jar"
29       type="application/x-java-applet"
30       width=500
31       height=200>
32     <noembed>
33       No Java Support.
34     </noembed>
35   </comment>
36 </object>
37
38
39 <script>
40 function startTest()
41 {
42     window.applet = document.getElementsByTagName("embed")[0];
43     if (!applet.createQAObject)
44         window.applet = document.getElementsByTagName("object")[0];
45
46     debug(TITLE + "\n");
47 }
48
49 function shouldBeWithErrorCheck(_a, _b)
50 {
51     // Don't want full stack traces from Java exceptions.
52     if (window.layoutTestController) {
53         try {
54             eval(_a);
55         } catch (ex) {
56             if (/Caused by: /.test(ex)) {
57                 testFailed(_a + ": Exception raised");
58                 return;
59             }
60         }
61     }
62
63     var b_eval;
64     try {
65         b_eval = eval(_b);
66     } catch (ex) {
67         testFailed(_b + ": " + ex);
68         return;
69     }
70
71     if (b_eval == "error")
72         shouldThrow(_a);
73     else
74         shouldBe(_a, _b);
75 }
76
77 function wkTestStringToJavaByteArray(string)
78 {
79     return applet.stringToByteArray(string);
80 }
81
82 function appendScript(text)
83 {
84     var el = document.createElement("script")
85     el.appendChild = document.createTextNode(text);
86     document.body.appendChild(el);
87 }
88
89 function onload()
90 {
91     try {
92         var req = new XMLHttpRequest();
93         req.open("GET", window.location.pathname.replace(/html$/, "js"), false);
94         if (req.overrideMimeType)
95             req.overrideMimeType("text/plain");
96         req.send();
97
98         if (!req.responseText.length)
99             throw "could not load test script";
100
101         var scriptElement = document.createElement("script")
102         scriptElement.appendChild(document.createTextNode(
103             req.responseText + "\n"));
104         document.body.appendChild(scriptElement);
105     } catch (ex) {
106         testFailed("Could not run test: " + ex);
107     }
108
109     scriptElement = document.createElement("script")
110     scriptElement.src = '../../../fast/js/resources/js-test-post-async.js'
111     document.body.appendChild(scriptElement);
112 }
113 </script>
114 </body>
115 </html>