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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/message-port-no-wrapper.html

Issue 2818563004: sendBeacon should throw a TypeError on bad URLs. (Closed)
Patch Set: Patch Set 2 was the final submit, 3 was uploaded by mistake. Created 3 years, 7 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 <body> 1 <body>
2 <p>Test that delivering a message to a port that was never referenced from JS do esn't cause a crash.</p> 2 <p>Test that delivering a message to a port that was never referenced from JS do esn't cause a crash.</p>
3 <pre id=log></pre> 3 <pre id=log></pre>
4 4 <script src="../../resources/gc.js"></script>
5 <script> 5 <script>
6 function gc()
7 {
8 if (window.GCController)
9 return GCController.collect();
10
11 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
12 var s = new String("abc");
13 }
14 }
15 6
16 function log(message) 7 function log(message)
17 { 8 {
18 document.getElementById("log").innerHTML += message + "<br>"; 9 document.getElementById("log").innerHTML += message + "<br>";
19 } 10 }
20 11
21 if (window.testRunner) { 12 if (window.testRunner) {
22 testRunner.dumpAsText(); 13 testRunner.dumpAsText();
23 testRunner.waitUntilDone(); 14 testRunner.waitUntilDone();
24 } 15 }
25 16
26 var channel = new MessageChannel; 17 var channel = new MessageChannel;
27 channel.port1.postMessage("msg"); 18 channel.port1.postMessage("msg");
28 channel.port1.start(); 19 channel.port1.start();
29 channel = 0; 20 channel = 0;
30 gc(); 21 gc();
31 22
32 setTimeout("log('PASS'); if (window.testRunner) testRunner.notifyDone()", 100); 23 setTimeout("log('PASS'); if (window.testRunner) testRunner.notifyDone()", 100);
33 24
34 </script> 25 </script>
35 </body> 26 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698