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

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: RefPtr->RefPtrWillBeRawPtr 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/misc/adopt-iframe-src-attr-after-remove-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
+<iframe id=i src="../navigation/resources/blank.txt"></iframe>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+window.onload = function()
+{
+ i.parentNode.removeChild(i);
+ gc();
+}
+
+document.addEventListener("DOMContentLoaded", function() {
+ setTimeout(function() {
+ document.adoptNode(i.attributes["src"]);
esprehn 2014/06/20 21:24:45 It abarth explained to me the reason for the adopt
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 0);
+}, false);
+</script>
« no previous file with comments | « no previous file | LayoutTests/http/tests/misc/adopt-iframe-src-attr-after-remove-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698