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

Unified Diff: LayoutTests/http/tests/misc/adopt-iframe-src-attr-after-remove.html

Issue 341273006: Protect an element while removing an attribute. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
Index: LayoutTests/http/tests/misc/adopt-iframe-src-attr-after-remove.html
diff --git a/LayoutTests/http/tests/misc/adopt-iframe-src-attr-after-remove.html b/LayoutTests/http/tests/misc/adopt-iframe-src-attr-after-remove.html
new file mode 100644
index 0000000000000000000000000000000000000000..e6f241dcf038859ca993b733edd275b1732bc825
--- /dev/null
+++ b/LayoutTests/http/tests/misc/adopt-iframe-src-attr-after-remove.html
@@ -0,0 +1,22 @@
+We pass if we don't crash under ASAN.
esprehn 2014/06/20 20:01:30 Missing doctype.
+<iframe id=i src="../navigation/resources/blank.txt"></iframe>
esprehn 2014/06/20 20:01:31 Can we use iframe instead of "i"?
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+window.onload = function()
+{
+ i.parentNode.removeChild(i);
esprehn 2014/06/20 20:01:30 i.remove();
+ gc();
+}
+
+document.addEventListener("DOMContentLoaded", function() {
+ setTimeout(function() {
+ document.adoptNode(i.attributes["src"]);
esprehn 2014/06/20 20:01:30 Just use removeAttribute? I don't know why you're
Nate Chapin 2014/06/20 20:17:42 I was building this off of a clusterfuzz testcase,
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 0);
+}, false);
+</script>

Powered by Google App Engine
This is Rietveld 408576698