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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/focus-and-update-layout-crash.html

Issue 2163893002: Avoid calling isFocusable() during updateLayout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layout test Created 4 years, 5 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: third_party/WebKit/LayoutTests/fast/dom/focus-and-update-layout-crash.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/focus-and-update-layout-crash.html b/third_party/WebKit/LayoutTests/fast/dom/focus-and-update-layout-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..6fa62de9f61f9c6c0c6886c0de8119f9e3a742d8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/focus-and-update-layout-crash.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<body></body>
+<script>
+// Test case for crbug.com/627074
+test(() => {
+ var iframe = document.createElement('iframe');
+ document.body.appendChild(iframe);
+
+ var doc = iframe.contentDocument;
+ var focusableIframe = document.createElement('iframe');
+ focusableIframe.id = 'iframe1';
+ doc.body.appendChild(focusableIframe);
+ focusableIframe.contentWindow.addEventListener('unload', function () {
+ focusableIframe.focus();
+ });
+ document.body.appendChild(focusableIframe);
+
+ focusableIframe = document.createElement('iframe');
+ focusableIframe.id = 'iframe2';
+ doc.body.appendChild(focusableIframe);
+
+ focusableIframe.focus();
+}, 'focus should not crash even when it involves updateLayout.');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | third_party/WebKit/Source/core/dom/Document.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698