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

Unified Diff: third_party/WebKit/LayoutTests/shadow-dom/focus-navigation-crash.html

Issue 1954023002: Move asserts in FocusNavigationController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove assertion Created 4 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
Index: third_party/WebKit/LayoutTests/shadow-dom/focus-navigation-crash.html
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/focus-navigation-crash.html b/third_party/WebKit/LayoutTests/shadow-dom/focus-navigation-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..cf3ce084da046aa13634aa4b1d0c4440bb02ec8c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/shadow-dom/focus-navigation-crash.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<script src='../resources/testharness.js'></script>
+<script src='../resources/testharnessreport.js'></script>
+<div id='log'></div>
+<div id='host'></div>This test is for crbug.com/609012<p id='target' tabindex='0'></p>
+
+<script>
+test(() => {
+ var host = document.getElementById('host');
+ var text = host.nextSibling;
+ host.attachShadow({mode: 'open'});
+
+ // Set sequential focus navigation starting point in the text node.
+ window.internals.setSequentialFocusNavigationStartingPoint(text);
+
+ // Sending TAB key would crash on false assertion.
+ window.eventSender.keyDown('\t');
+ assert_equals(document.activeElement.id, 'target');
+}, 'Sequential focus navigation should not crash.');
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698