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

Side by Side Diff: third_party/WebKit/LayoutTests/plugins/release-frame-content-window.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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <script type="text/javascript">
4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.waitUntilDone();
7 }
8
9
10 function runTest() {
11 var p = document.getElementById('plg');
12 var iframe = document.getElementById('frame-id');
13 p.remember(iframe.contentWindow);
14
15 var someObject = {a: 1, b: 2};
16 // Load another page in iframe, so plugin keeps reference to old frame's con tentWindow.
17 iframe.onload = function() {
18 // This will trigger Release Object for previously remembered reference.
19 p.remember(someObject);
20 document.getElementById('result').innerHTML = 'SUCCESS';
21 if (window.testRunner)
22 testRunner.notifyDone();
23 };
24 iframe.src = 'resources/empty2.html';
25 }
26
27 </script>
28 <body>
29 <embed id="plg" type="application/x-webkit-test-netscape"></embed><P>
30 <iframe id="frame-id" src="resources/empty.html" onload='runTest()'></iframe>
31 <div>This tests that releasing a reference to a contentWindow that has already b een navigated away works correctly and does not crash. If this test is successfu l, the word SUCCESS should be seen below.</div>
32 <div id="result">FAILED</div>
33 </body>
34 </html>
35
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698