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

Side by Side Diff: LayoutTests/plugins/npruntime/script-tests/browser-object-identity.js

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 description("Test that plugin doesn't get a new browser object instance each tim e")
2
3 function gc()
4 {
5 if (window.GCController)
6 return GCController.collectAll();
7
8 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
9 var s = new String("abc");
10 }
11 }
12
13 embed = document.createElement("embed");
14 embed.type = "application/x-webkit-test-netscape";
15 document.body.appendChild(embed);
16
17 var obj = new XMLHttpRequest;
18 obj.foo = "bar";
19 embed.remember(obj);
20 obj = null;
21 gc();
22 shouldBe("embed.getAndForgetRememberedObject().foo", "'bar'");
23 gc();
24
25 obj = new XMLHttpRequest;
26 shouldBe("embed.refCount(obj)", "1");
27 shouldBe("embed.refCount(obj)", "1");
28 embed.remember(obj);
29 shouldBe("embed.refCount(obj)", "2");
30 shouldBe("embed.getRememberedObject()", "obj");
31 shouldBe("embed.getRememberedObject()", "obj");
32 shouldBe("embed.refCount(obj)", "2");
33 shouldBe("embed.getAndForgetRememberedObject()", "obj");
34 shouldBe("embed.refCount(obj)", "1");
35 obj = null;
36 gc();
37
38 var successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698