| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import os | 6 import os |
| 7 import re | 7 import re |
| 8 | 8 |
| 9 import pyauto_functional | 9 import pyauto_functional |
| 10 import pyauto | 10 import pyauto |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 self.GetActiveTabTitle()) | 148 self.GetActiveTabTitle()) |
| 149 | 149 |
| 150 def testDownloadsShortcut(self): | 150 def testDownloadsShortcut(self): |
| 151 """Verify downloads shortcut opens downloads page.""" | 151 """Verify downloads shortcut opens downloads page.""" |
| 152 self.RunCommand(pyauto.IDC_SHOW_DOWNLOADS) | 152 self.RunCommand(pyauto.IDC_SHOW_DOWNLOADS) |
| 153 self.assertEqual('Downloads', self.GetActiveTabTitle(), | 153 self.assertEqual('Downloads', self.GetActiveTabTitle(), |
| 154 msg='Downloads page was not opened.') | 154 msg='Downloads page was not opened.') |
| 155 | 155 |
| 156 def testHelpShortcut(self): | 156 def testHelpShortcut(self): |
| 157 """Verify help shortcut opens help page.""" | 157 """Verify help shortcut opens help page.""" |
| 158 self.ApplyAccelerator(pyauto.IDC_HELP_PAGE) | 158 self.ApplyAccelerator(pyauto.IDC_HELP_PAGE_VIA_KEYBOARD) |
| 159 help_page_title = 'Google Chrome Help' | 159 help_page_title = 'Google Chrome Help' |
| 160 if self.IsChromeOS(): | 160 if self.IsChromeOS(): |
| 161 help_page_title = 'Chrome OS Help' | 161 help_page_title = 'Chrome OS Help' |
| 162 self.assertTrue(self.WaitUntil(lambda: self.GetActiveTabTitle(), | 162 self.assertTrue(self.WaitUntil(lambda: self.GetActiveTabTitle(), |
| 163 expect_retval=help_page_title), | 163 expect_retval=help_page_title), |
| 164 msg='Google Chrome help page has not opened.') | 164 msg='Google Chrome help page has not opened.') |
| 165 | 165 |
| 166 def testSwitchingTabsShortcuts(self): | 166 def testSwitchingTabsShortcuts(self): |
| 167 """Verify switching tabs shortcuts.""" | 167 """Verify switching tabs shortcuts.""" |
| 168 url1 = self.GetFileURLForDataPath('title1.html') | 168 url1 = self.GetFileURLForDataPath('title1.html') |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 self.assertEquals('Title Of Awesomeness', self.GetActiveTabTitle()) | 202 self.assertEquals('Title Of Awesomeness', self.GetActiveTabTitle()) |
| 203 # Verify forward navigation. | 203 # Verify forward navigation. |
| 204 self.RunCommand(pyauto.IDC_FORWARD) | 204 self.RunCommand(pyauto.IDC_FORWARD) |
| 205 self.assertEquals('Title Of More Awesomeness', self.GetActiveTabTitle()) | 205 self.assertEquals('Title Of More Awesomeness', self.GetActiveTabTitle()) |
| 206 | 206 |
| 207 # TODO: Open homepage shortcut. crbug.com/74103 | 207 # TODO: Open homepage shortcut. crbug.com/74103 |
| 208 | 208 |
| 209 | 209 |
| 210 if __name__ == '__main__': | 210 if __name__ == '__main__': |
| 211 pyauto_functional.Main() | 211 pyauto_functional.Main() |
| OLD | NEW |