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

Unified Diff: third_party/WebKit/LayoutTests/plugins/refcount-leaks.html

Issue 1483733002: Remove support for NPObjects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad rebase. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/plugins/refcount-leaks.html
diff --git a/third_party/WebKit/LayoutTests/plugins/refcount-leaks.html b/third_party/WebKit/LayoutTests/plugins/refcount-leaks.html
deleted file mode 100644
index 0980fe1b275022a35f3739c7ced425f67bdc1bb6..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/plugins/refcount-leaks.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<script>
- function noop(x) {
- }
-
- function doGC() {
- if (window.GCController) {
- window.GCController.collectAll();
- }
- }
-
- function runtest() {
- if (window.testRunner)
- testRunner.dumpAsText();
-
-
- var output = document.getElementById("output");
- output.innerHTML = "";
-
- // Test that objects are deleted after their JS references are released.
- var countOrig = plug.testObjectCount;
- o1 = plug.testCreateTestObject();
- o2 = plug.testCreateTestObject();
- o3 = plug.testCreateTestObject();
- var countAfterCreate = plug.testObjectCount;
- o1 = o2 = o3 = null;
- doGC();
- var countAfterGC = plug.testObjectCount;
-
- output.innerHTML += "--- num test objects:<br>";
- output.innerHTML += "countAfterCreate == countOrig + 3? "
- + ((countAfterCreate == countOrig + 3) ? "PASS" : "FAIL")
- + "<br>";
- output.innerHTML += "countOrig == countAfterGC? "
- + ((countOrig == countAfterGC) ? "PASS" : "FAIL")
- + "<br>";
- output.innerHTML += "<br>";
-
- // Test that the object refcount returns to normal after JS references
- // are released.
- var testObj = plug.testObject;
- var refOrig = testObj.refCount;
- var o1 = plug.testObject;
- var o2 = plug.testObject;
- var o3 = plug.testObject;
- var refAfterGet = testObj.refCount;
- o1 = o2 = o3 = null;
- doGC();
- var refAfterGetGC = testObj.refCount;
-
- // Test that calling NPN_Invoke with our object as a parameter returns
- // our refcount to normal (may require a GC).
- plug.testPassTestObject("noop", testObj);
- plug.testPassTestObject("noop", testObj);
- plug.testPassTestObject("noop", testObj);
- doGC();
- var refAfterPass = testObj.refCount;
-
- output.innerHTML += "--- refcount on plug.testObject:<br>";
- output.innerHTML += "originally: " + refOrig + "<br>";
- output.innerHTML += "after GC: " + refAfterGetGC + "<br>";
- output.innerHTML += "after passing: " + refAfterPass + "<br>";
-
- var success = (countAfterGC == countOrig) && (refAfterPass == refOrig);
- output.innerHTML += (success ? "SUCCESS" : "FAILURE");
- }
-</script>
-
-<body onload="runtest()">
-
-Test that we can get an NPObject returned through a method on
-an NPAPI Object.<P>
-
-Prints "SUCCESS" on success, "FAILURE" on failure.
-
-<embed name="plug" type="application/x-webkit-test-netscape">
-
-<div id=output>FAILURE</div>
-
-</body>
-

Powered by Google App Engine
This is Rietveld 408576698