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

Unified Diff: LayoutTests/compositing/overflow/do-not-crash-use-after-free-update-widget-positions.html

Issue 490473003: Defer call to updateWidgetPositions() outside of RenderLayerScrollableArea. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: doctype Created 6 years, 4 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/compositing/overflow/do-not-crash-use-after-free-update-widget-positions-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/compositing/overflow/do-not-crash-use-after-free-update-widget-positions.html
diff --git a/LayoutTests/compositing/overflow/do-not-crash-use-after-free-update-widget-positions.html b/LayoutTests/compositing/overflow/do-not-crash-use-after-free-update-widget-positions.html
new file mode 100644
index 0000000000000000000000000000000000000000..8f4d71cc76ae3093b28ae3f6a6171df7c1f37863
--- /dev/null
+++ b/LayoutTests/compositing/overflow/do-not-crash-use-after-free-update-widget-positions.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<!-- This test is to catch a flakey use-after-free for ASAN bots. (see crbug.com/402407) -->
+<script>
+ function start() {
+ svgIframe = document.createElement('iframe');
+ svgIframe.src = 'resources/do-not-crash-use-after-free-update-widget-positions.svg';
+
+ bodyElement = document.body;
+
+ articleElement = document.createElement('article');
+ acronymElement = document.createElement('acronym');
+
+ bodyElement.style.overflow = 'scroll';
+
+ selectionRange = document.createRange();
+ selectionRange.selectNodeContents(articleElement);
+ selectionRange.surroundContents(bodyElement);
+
+ w3Iframe = document.createElementNS('http://www.w3.org/1999/xhtml', 'iframe');
+ w3Iframe.src = 'resources/do-not-crash-use-after-free-update-widget-positions-iframe.html';
+ w3Iframe.onload = iframeOnLoad;
+ document.documentElement.appendChild(w3Iframe);
+
+ selectionRange.insertNode(svgIframe);
+ bodyElement.style.position = 'fixed';
+
+ while (svgIframe.parentNode) {
+ svgIframe = svgIframe.parentNode;
+ }
+
+ svgIframe.createElement;
+
+ document.documentElement.appendChild(svgIframe);
+
+ acronymElement.style.position = 'absolute';
+ }
+
+ function iframeOnLoad() {
+ bodyElement.appendChild(acronymElement);
+ acronymElement.offsetWidth;
+
+ acronymElement.appendChild(w3Iframe);
+ w3Iframe.offsetWidth;
+
+ window.setTimeout('window.iframeCallback()', 50);
+ }
+
+ function iframeCallback() {
+ bodyElement.style.cssText = null;
+
+ w3Iframe.contentDocument.location.hash = 'element0';
+ }
+
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ }
+</script>
+<body onload = "start()">
+ This test passes if it doesn't crash.
+</body>
« no previous file with comments | « no previous file | LayoutTests/compositing/overflow/do-not-crash-use-after-free-update-widget-positions-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698