| Index: chrome/test/data/pdf/basic_test_material.js
|
| diff --git a/chrome/test/data/pdf/basic_test_material.js b/chrome/test/data/pdf/basic_test_material.js
|
| index 33d617603f17257396eb31761085ad4a7ae04b29..cd713b6b372ee6cc45797b889b7cf2b6ae099d50 100644
|
| --- a/chrome/test/data/pdf/basic_test_material.js
|
| +++ b/chrome/test/data/pdf/basic_test_material.js
|
| @@ -36,6 +36,21 @@ var tests = [
|
| plugin.getAttribute('src').indexOf('/pdf/test.pdf') != -1);
|
| chrome.test.succeed();
|
| },
|
| +
|
| + /**
|
| + * Test that shouldIgnoreKeyEvents correctly searches through the shadow DOM
|
| + * to find input fields.
|
| + */
|
| + function testIgnoreKeyEvents() {
|
| + document.getElementById('material-toolbar').$.pageselector.$.input.focus();
|
| + // Tests that the traversal through the shadow DOM works correctly.
|
| + chrome.test.assertTrue(
|
| + shouldIgnoreKeyEvents(document.getElementById('material-toolbar')));
|
| + chrome.test.assertFalse(
|
| + shouldIgnoreKeyEvents(document.getElementById('plugin')));
|
| +
|
| + chrome.test.succeed();
|
| + }
|
| ];
|
|
|
| chrome.test.runTests(tests);
|
|
|