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

Unified Diff: LayoutTests/fast/dom/HTMLScriptElement/script-cancel-crash.html

Issue 288673002: Make ScriptLoader into a ResourceOwner (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLScriptElement/script-cancel-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/HTMLScriptElement/script-cancel-crash.html
diff --git a/LayoutTests/fast/dom/HTMLScriptElement/script-cancel-crash.html b/LayoutTests/fast/dom/HTMLScriptElement/script-cancel-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..1da76d444be5920e17b1b035bb2dd5eb9ca3c280
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLScriptElement/script-cancel-crash.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<body>
+<script src="../../../resources/js-test.js"></script>
+<script>
+window.jsTestIsAsync = true;
+
+function requestAndCancel() {
+ var element = document.createElement('script');
+ document.body.appendChild(element);
+ element.setAttribute('src', 'nosuch');
+ document.body.removeChild(element);
+}
+
+function makePressure() {
+ p = [];
+ q = Array(1000).join(unescape('xxxxxx'));
+ for (var i = 0; i < 12501; i++) {
+ p.push(new String(q));
+ }
+}
+
+for (var i = 0; i < 500; i++)
+ requestAndCancel();
+
+setTimeout(function() {
+ makePressure();
+ gc();
+ debug('PASS unless crash.');
+ finishJSTest();
+}, 0);
+</script>
+</body>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLScriptElement/script-cancel-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698