function testIgnoreKeyEvents() {
    // Test that the traversal through the shadow DOM works correctly.
    var toolbar = document.getElementById('toolbar');
    toolbar.$.pageselector.$.input.focus();
    chrome.test.assertTrue(shouldIgnoreKeyEvents(toolbar));

    // Test case where the active element has a shadow root of its own.
    toolbar.$.buttons.children[1].focus();
    chrome.test.assertFalse(shouldIgnoreKeyEvents(toolbar));

    chrome.test.assertFalse(
        shouldIgnoreKeyEvents(document.getElementById('plugin')));

    chrome.test.succeed();
  }
/**
   * Test that shouldIgnoreKeyEvents correctly searches through the shadow DOM
   * to find input fields.
   */
Test that shouldIgnoreKeyEvents correctly searches through the shadow DOM
to find input fields.
Test that shouldIgnoreKeyEvents correctly searches through the shadow DOM to find input fields .
function testIgnoreKeyEvents() {
    var toolbar = document.getElementById('toolbar');
    toolbar.$.pageselector.$.input.focus();
    chrome.test.assertTrue(shouldIgnoreKeyEvents(toolbar));
    toolbar.$.buttons.children[1].focus();
    chrome.test.assertFalse(shouldIgnoreKeyEvents(toolbar));
    chrome.test.assertFalse(
        shouldIgnoreKeyEvents(document.getElementById('plugin')));
    chrome.test.succeed();
  }
function testIgnoreKeyEvents ( ) { var toolbar = document . getElementById ( 'toolbar' ) ; toolbar . $ . pageselector . $ . input . focus ( ) ; chrome . test . assertTrue ( shouldIgnoreKeyEvents ( toolbar ) ) ; toolbar . $ . buttons . children [ 1 ] . focus ( ) ; chrome . test . assertFalse ( shouldIgnoreKeyEvents ( toolbar ) ) ; chrome . test . assertFalse ( shouldIgnoreKeyEvents ( document . getElementById ( 'plugin' ) ) ) ; chrome . test . succeed ( ) ; }
Test that shouldIgnoreKeyEvents correctly searches through the shadow DOM
 to find input fields.
Test that shouldIgnoreKeyEvents correctly searches through the shadow DOM to find input fields .
// Test that the traversal through the shadow DOM works correctly. // Test case where the active element has a shadow root of its own.