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

Side by Side Diff: third_party/WebKit/LayoutTests/plugins/release-frame-content-window.html

Issue 1821103002: Migrate a bunch of LayoutTests from NPAPI to PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_open-and-close-window-with-plugin
Patch Set: rebase; fix expectations for plugin-initiate-popup-window-expected 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <script type="text/javascript"> 3 <script type="text/javascript">
4 if (window.testRunner) { 4 if (window.testRunner) {
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 testRunner.waitUntilDone(); 6 testRunner.waitUntilDone();
7 } 7 }
8 8
9 9
10 function runTest() { 10 function runTest() {
11 var p = document.getElementById('plg'); 11 var p = document.getElementById('plg');
12 var iframe = document.getElementById('frame-id'); 12 var iframe = document.getElementById('frame-id');
13 p.remember(iframe.contentWindow); 13 p.remember(iframe.contentWindow);
14 14
15 var someObject = {a: 1, b: 2}; 15 var someObject = {a: 1, b: 2};
16 // Load another page in iframe, so plugin keeps reference to old frame's con tentWindow. 16 // Load another page in iframe, so plugin keeps reference to old frame's con tentWindow.
17 iframe.onload = function() { 17 iframe.onload = function() {
18 // This will trigger Release Object for previously remembered reference. 18 // This will trigger Release Object for previously remembered reference.
19 p.remember(someObject); 19 p.remember(someObject);
20 document.getElementById('result').innerHTML = 'SUCCESS'; 20 document.getElementById('result').innerHTML = 'SUCCESS';
21 if (window.testRunner) 21 if (window.testRunner)
22 testRunner.notifyDone(); 22 testRunner.notifyDone();
23 }; 23 };
24 iframe.src = 'resources/empty2.html'; 24 iframe.src = 'resources/empty2.html';
25 } 25 }
26 26
27 </script> 27 </script>
28 <body> 28 <body>
29 <embed id="plg" type="application/x-webkit-test-netscape"></embed><P> 29 <embed id="plg" type="application/x-blink-deprecated-test-plugin"></embed><P>
30 <iframe id="frame-id" src="resources/empty.html" onload='runTest()'></iframe> 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> 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> 32 <div id="result">FAILED</div>
33 </body> 33 </body>
34 </html> 34 </html>
35 35
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698