Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / plugins / multiple-plugins.html
blob9b71be0b655d0d21baf897972d89f4f49dda33a1
1 <script>
2 function noop(x) {
5 function doGC() {
6 if (window.GCController)
7 GCController.collectAll();
10 function runtest() {
11 if (window.testRunner)
12 testRunner.dumpAsText();
14 doGC();
16 var plug1 = document.getElementById("plug1");
17 var plug2 = document.getElementById("plug2");
18 var output = document.getElementById("output");
19 output.innerHTML = "";
21 var testObj1 = plug1.testObject;
22 var testObj2 = plug2.testObject;
24 var successCount = 0;
26 // Verify we can access each object.
27 if (testObj1.foo == "foo") {
28 successCount++;
29 output.innerHTML += "Got testObj1 property<br>";
31 if (testObj2.foo == "foo") {
32 successCount++;
33 output.innerHTML += "Got testObj2 property<br>";
36 // Now remove the first plugin
37 plug1.parentNode.removeChild(plug1);
39 try {
40 if (testObj1.foo == "foo") {
41 output.innerHTML = "Accessed nuked object!<br>";
43 } catch (e) {
44 if (e instanceof ReferenceError)
45 successCount++;
48 try {
49 if (testObj2.foo == "foo") {
50 successCount++;
51 output.innerHTML += "Got testObj2 property<br>";
53 } catch(e) {
54 output.inerHTML += "Reference error accessing live object: " + e;
57 // Now remove the second plugin
58 plug2.parentNode.removeChild(plug2);
60 try {
61 if (testObj2.foo == "foo") {
62 output.innerHTML = "Accessed nuked object!<br>";
64 } catch (e) {
65 if (e instanceof ReferenceError)
66 successCount++;
69 var success = (successCount == 5);
70 output.innerHTML += (success ? "SUCCESS" : "FAILURE");
72 </script>
74 <body onload="runtest()">
76 Test that we can create two plugins, and independently clean each.
78 Prints "SUCCESS" on success, "FAILURE" on failure.
80 <embed id="plug1" type="application/x-webkit-test-netscape">
81 <embed id="plug2" type="application/x-webkit-test-netscape">
83 <div id=output>FAILURE</div>
85 </body>