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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/removed-image-as-property.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 onload="test()"> 1 <body onload="test()">
2 <p>Test that an image isn't accessible via form.property syntax after being remo ved from document.</p> 2 <p>Test that an image isn't accessible via form.property syntax after being remo ved from document.</p>
3 <div>Testing...</div> 3 <div>Testing...</div>
4 <form className="a"> 4 <form className="a">
5 <img src="" id="i"> 5 <img src="" id="i">
6 </form> 6 </form>
7 <script src="../../resources/gc.js"></script>
7 <script> 8 <script>
8 if (window.testRunner) { 9 if (window.testRunner) {
9 testRunner.dumpAsText(); 10 testRunner.dumpAsText();
10 testRunner.waitUntilDone(); 11 testRunner.waitUntilDone();
11 } 12 }
12 13
13 function gc()
14 {
15 if (window.GCController)
16 return GCController.collect();
17
18 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
19 var s = new String("abc");
20 }
21 }
22
23 function test() 14 function test()
24 { 15 {
25 var f = document.getElementsByTagName("form")[0]; 16 var f = document.getElementsByTagName("form")[0];
26 f.removeChild(document.getElementsByTagName("img")[0]); 17 f.removeChild(document.getElementsByTagName("img")[0]);
27 f.foobar; 18 f.foobar;
28 setTimeout(function() { 19 setTimeout(function() {
29 gc(); 20 gc();
30 try { 21 try {
31 f.i.nodeName; 22 f.i.nodeName;
32 document.getElementsByTagName("div")[0].innerHTML = "FAIL"; 23 document.getElementsByTagName("div")[0].innerHTML = "FAIL";
33 } catch (ex) { 24 } catch (ex) {
34 document.getElementsByTagName("div")[0].innerHTML = "PASS"; 25 document.getElementsByTagName("div")[0].innerHTML = "PASS";
35 } 26 }
36 if (window.testRunner) 27 if (window.testRunner)
37 testRunner.notifyDone(); 28 testRunner.notifyDone();
38 }, 0); 29 }, 0);
39 } 30 }
40 </script> 31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698