|
|
Chromium Code Reviews|
Created:
9 years, 12 months ago by sunandt Modified:
9 years, 7 months ago CC:
chromium-reviews, anantha, krisr Visibility:
Public. |
DescriptionAdding pyauto tests for checking Chrome shortcuts.
BUG=none
TEST=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=75335
Patch Set 1 #
Total comments: 10
Patch Set 2 : '' #
Total comments: 16
Patch Set 3 : '' #
Total comments: 2
Patch Set 4 : '' #Messages
Total messages: 9 (0 generated)
Tests for first set of shortcuts.
Ccing kris since he was also interested in seeing a test for shortcuts. Kris, the accelerators used in this test are equivalent to keyboard shortcuts, except that it's cross-platform. http://codereview.chromium.org/6018010/diff/1/functional/shortcuts.py File functional/shortcuts.py (right): http://codereview.chromium.org/6018010/diff/1/functional/shortcuts.py#newcode29 functional/shortcuts.py:29: # TODO: Save page as Remove commented out code http://codereview.chromium.org/6018010/diff/1/functional/shortcuts.py#newcode40 functional/shortcuts.py:40: # self.ApplyAccelerator(pyauto.IDC_PRINT) remove http://codereview.chromium.org/6018010/diff/1/functional/shortcuts.py#newcode49 functional/shortcuts.py:49: # self.RunCommand(pyauto.IDC_CLOSE_WINDOW, 1) ditto http://codereview.chromium.org/6018010/diff/1/functional/shortcuts.py#newcode52 functional/shortcuts.py:52: # self.ApplyAccelerator(pyauto.IDC_CLEAR_BROWSING_DATA) ditto http://codereview.chromium.org/6018010/diff/1/functional/shortcuts.py#newcode56 functional/shortcuts.py:56: self.assertEqual(2, self.GetTabCount(), msg='Can\'t View Source.') Also check tab url begins with view-source:
Do we have a status for this test?
I have to make the recommended changes and check-in. On 2011/02/17 01:47:57, dyu1 wrote: > Do we have a status for this test?
http://codereview.chromium.org/6018010/diff/1/functional/shortcuts.py File functional/shortcuts.py (right): http://codereview.chromium.org/6018010/diff/1/functional/shortcuts.py#newcode29 functional/shortcuts.py:29: # TODO: Save page as On 2011/01/07 02:01:30, Nirnimesh wrote: > Remove commented out code Done. http://codereview.chromium.org/6018010/diff/1/functional/shortcuts.py#newcode40 functional/shortcuts.py:40: # self.ApplyAccelerator(pyauto.IDC_PRINT) On 2011/01/07 02:01:30, Nirnimesh wrote: > remove Done. http://codereview.chromium.org/6018010/diff/1/functional/shortcuts.py#newcode49 functional/shortcuts.py:49: # self.RunCommand(pyauto.IDC_CLOSE_WINDOW, 1) On 2011/01/07 02:01:30, Nirnimesh wrote: > ditto Done. http://codereview.chromium.org/6018010/diff/1/functional/shortcuts.py#newcode52 functional/shortcuts.py:52: # self.ApplyAccelerator(pyauto.IDC_CLEAR_BROWSING_DATA) On 2011/01/07 02:01:30, Nirnimesh wrote: > ditto Done. http://codereview.chromium.org/6018010/diff/1/functional/shortcuts.py#newcode56 functional/shortcuts.py:56: self.assertEqual(2, self.GetTabCount(), msg='Can\'t View Source.') On 2011/01/07 02:01:30, Nirnimesh wrote: > Also check tab url begins with view-source: Done.
http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py File functional/shortcuts.py (right): http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:2: # Copyright (c) 2010 The Chromium Authors. All rights reserved. 2011 http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:11: Add a docstring http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:13: """Verify that shortcuts work fine.""" remove 'that' & 'fine' http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:17: self.RunCommand(pyauto.IDC_CLOSE_TAB) close without the accelerator http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:43: msg='View Source URL is not correct.') close this tab? http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:58: self.RunCommand(pyauto.IDC_CLOSE_WINDOW, 1) use CloseBrowserWindow(). you're not checking the shortcuts here http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:75: expect_retval='Google Chrome Help'), what happens on Chromium? http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:77: self.RunCommand(pyauto.IDC_CLOSE_TAB) close tab without the accelerator
http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py File functional/shortcuts.py (right): http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:2: # Copyright (c) 2010 The Chromium Authors. All rights reserved. On 2011/02/17 23:45:40, Nirnimesh wrote: > 2011 Done. http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:11: On 2011/02/17 23:45:40, Nirnimesh wrote: > Add a docstring Done. http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:13: """Verify that shortcuts work fine.""" On 2011/02/17 23:45:40, Nirnimesh wrote: > remove 'that' & 'fine' Done. http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:17: self.RunCommand(pyauto.IDC_CLOSE_TAB) On 2011/02/17 23:45:40, Nirnimesh wrote: > close without the accelerator We have a shortcut to close a tab. Separating, so it's meaningful. http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:43: msg='View Source URL is not correct.') On 2011/02/17 23:45:40, Nirnimesh wrote: > close this tab? Done. http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:58: self.RunCommand(pyauto.IDC_CLOSE_WINDOW, 1) On 2011/02/17 23:45:40, Nirnimesh wrote: > use CloseBrowserWindow(). you're not checking the shortcuts here Done. http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:75: expect_retval='Google Chrome Help'), On 2011/02/17 23:45:40, Nirnimesh wrote: > what happens on Chromium? Same text. http://codereview.chromium.org/6018010/diff/7001/functional/shortcuts.py#newc... functional/shortcuts.py:77: self.RunCommand(pyauto.IDC_CLOSE_TAB) On 2011/02/17 23:45:40, Nirnimesh wrote: > close tab without the accelerator Done.
LGTM, with one comment http://codereview.chromium.org/6018010/diff/10001/functional/shortcuts.py File functional/shortcuts.py (right): http://codereview.chromium.org/6018010/diff/10001/functional/shortcuts.py#new... functional/shortcuts.py:20: self.RunCommand(pyauto.IDC_CLOSE_TAB) you don't verify anything after closing this tab!
Thank you. http://codereview.chromium.org/6018010/diff/10001/functional/shortcuts.py File functional/shortcuts.py (right): http://codereview.chromium.org/6018010/diff/10001/functional/shortcuts.py#new... functional/shortcuts.py:20: self.RunCommand(pyauto.IDC_CLOSE_TAB) On 2011/02/18 00:15:16, Nirnimesh wrote: > you don't verify anything after closing this tab! Added a check here and after closing a window as well. |
