Chromium Code Reviews| Index: chrome/test/data/webui/cr_elements/cr_dialog_test.js |
| diff --git a/chrome/test/data/webui/cr_elements/cr_dialog_test.js b/chrome/test/data/webui/cr_elements/cr_dialog_test.js |
| index 7a8c3b548a9230343c8130a1386749c2fa359ace..eca65fb31485e0e770f461a9c3eef896f5a96d1a 100644 |
| --- a/chrome/test/data/webui/cr_elements/cr_dialog_test.js |
| +++ b/chrome/test/data/webui/cr_elements/cr_dialog_test.js |
| @@ -58,6 +58,12 @@ suite('cr-dialog', function() { |
| pressEnter(otherButton); |
| assertEquals(0, clickedCounter); |
| + // Enter keys on the close icon in the top-right corner should be ignored. |
| + var closeButton = document.body.querySelector('* /deep/ #close'); |
|
dpapad
2017/05/15 23:38:56
Can we use dialog.getCloseButton() instead? See ht
tommycli
2017/05/15 23:43:04
Done.
|
| + assertTrue(!!closeButton); |
| + pressEnter(closeButton); |
| + assertEquals(0, clickedCounter); |
| + |
| // Enter key on the action button should only fire the click handler once. |
| MockInteractions.tap(actionButton, 'keypress', 13, undefined, 'Enter'); |
|
dpapad
2017/05/15 23:38:56
Is the dialog closed (because of the code added ab
tommycli
2017/05/15 23:43:04
I reordered the tests just to be safe.
|
| assertEquals(1, clickedCounter); |