Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / plugins / nested-plugin-objects.html
blobf18c1879b7a4a485f2dcdc1a5fdbc7d5044454b8
1 <html>
2 <script>
4 var callbackCount = 0;
6 function npapiCallback(x) {
7 callbackCount++;
10 function runTest()
12 if (window.testRunner)
13 testRunner.dumpAsText();
15 var successCount = 0;
16 var plugin = document.getElementById("testPlugin");
17 plugin.logDestroy = true;
19 var testObject = plugin.testObject;
20 plugin.testPassTestObject("npapiCallback", testObject);
21 var testObject2 = testObject.testObject;
22 plugin.testPassTestObject("npapiCallback", testObject2);
23 var testObject3 = testObject2.testObject;
24 plugin.testPassTestObject("npapiCallback", testObject3);
26 if (callbackCount == 3)
27 successCount++;
29 plugin.parentNode.removeChild(plugin);
31 try {
32 testObject.property;
33 } catch (e) {
34 if (e instanceof ReferenceError)
35 successCount++;
38 try {
39 testObject.property = 'hello';
40 } catch (e) {
41 if (e instanceof ReferenceError)
42 successCount++;
45 try {
46 testObject2.property;
47 } catch (e) {
48 if (e instanceof ReferenceError)
49 successCount++;
52 try {
53 testObject3.property;
54 } catch (e) {
55 if (e instanceof ReferenceError)
56 successCount++;
59 if (successCount == 5)
60 document.getElementById('result').innerHTML = 'SUCCESS';
63 </script>
65 <body onload="runTest();">
66 <pre>
67 This tests that objects from plugin objects are properly cleaned up.
69 Example:
70 plugin
71 ------- (Creates) ------ Object1
72 ------- (Creates) ------ Object2
74 It is important that both Object1 and Object2 cleanup as a result of
75 cleaning up the plugin.
77 <div id="result">FAILURE</div>
78 <embed id="testPlugin" type="application/x-webkit-test-netscape" width="200" height="200"></embed>
79 </body>
80 </html>