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

Side by Side Diff: LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash.xhtml

Issue 10408073: Merge 117224 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html xmlns="http://www.w3.org/1999/xhtml"> 2 <html xmlns="http://www.w3.org/1999/xhtml">
3 Test passes if it does not crash. 3 Test passes if it does not crash.
4 <object id="object" type="image/svg+xml" /> 4 <object id="object" type="image/svg+xml" />
5 <script src="../../js/resources/js-test-pre.js"></script> 5 <script src="../../js/resources/js-test-pre.js"></script>
6 <script> 6 <script>
7 window.jsTestIsAsync = true; 7 window.jsTestIsAsync = true;
8 var count = 0; 8 var count = 0;
9 function setText() { 9 function setText() {
10 count++; 10 count++;
11 if (count > 100) { 11 if (count > 100) {
12 document.removeEventListener("beforeload", setText, true); 12 document.removeEventListener("beforeload", setText, true);
13 finishJSTest(); 13 finishJSTest();
14 } 14 }
15 gc(); // Because we are recursively entering into setText, can't gc() after this command. 15 gc(); // Because we are recursively entering into setText, can't gc() after this command.
16 document.getElementById("object").textContent = "A"; 16 document.getElementById("object").textContent = "A";
17 } 17 }
18 document.execCommand("SelectAll"); 18 document.execCommand("SelectAll");
19 document.getElementById("object").textContent = "A"; 19 document.getElementById("object").textContent = "A";
20 document.addEventListener("beforeload", setText, true); 20 document.addEventListener("beforeload", setText, true);
21 event = document.createEvent("Event"); 21 event = document.createEvent("Event");
22 event.initEvent("beforeload", false); 22 event.initEvent("beforeload", false);
23 document.documentElement.dispatchEvent(event); 23 document.documentElement.dispatchEvent(event);
24 </script> 24 </script>
25 <script src="../../js/resources/js-test-post.js"></script> 25 <script src="../../js/resources/js-test-post.js"></script>
26 </html> 26 </html>
27 27
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698