Commit 9a4e07f0 authored by Scott Chen's avatar Scott Chen Committed by Commit Bot

PDF Viewer: fix flakey test.

Suspected reason for flakiness is that the timing of cr-input shifting focus onto the
internal input sets it as the activeElement too late.

Bug: 855637
Change-Id: Ifdc3fa26c357ca6aa1e92180ec309cca4e455e07
Reviewed-on: https://chromium-review.googlesource.com/1112350
Commit-Queue: Scott Chen <scottchen@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569726}
parent 65338c09
...@@ -41,7 +41,7 @@ var tests = [ ...@@ -41,7 +41,7 @@ var tests = [
function testIgnoreKeyEvents() { function testIgnoreKeyEvents() {
// Test that the traversal through the shadow DOM works correctly. // Test that the traversal through the shadow DOM works correctly.
var toolbar = document.getElementById('toolbar'); var toolbar = document.getElementById('toolbar');
toolbar.$.pageselector.pageSelector.focus(); toolbar.$.pageselector.pageSelector.inputElement.focus();
chrome.test.assertTrue(shouldIgnoreKeyEvents(toolbar)); chrome.test.assertTrue(shouldIgnoreKeyEvents(toolbar));
// Test case where the active element has a shadow root of its own. // Test case where the active element has a shadow root of its own.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment