| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 | 7 |
| 8 import pyauto_functional # Must be imported before pyauto | 8 import pyauto_functional # Must be imported before pyauto |
| 9 import pyauto | 9 import pyauto |
| 10 import test_utils | 10 import test_utils |
| 11 | 11 |
| 12 | 12 |
| 13 class NTPTest(pyauto.PyUITest): | 13 class NTPTest(pyauto.PyUITest): |
| 14 """Test of the NTP.""" | 14 """Test of the NTP.""" |
| 15 | 15 |
| 16 # Default apps are registered in ProfileImpl::RegisterComponentExtensions(). | 16 # Default apps are registered in ProfileImpl::RegisterComponentExtensions(). |
| 17 _EXPECTED_DEFAULT_APPS = [ | 17 _EXPECTED_DEFAULT_APPS = [ |
| 18 {u'name': u'Chrome Web Store'}, | 18 {u'name': u'Chrome Web Store'}, |
| 19 {u'name': u'Cloud Print'}, | |
| 20 ] | 19 ] |
| 21 if pyauto.PyUITest.IsChromeOS(): | 20 if pyauto.PyUITest.IsChromeOS(): |
| 22 _EXPECTED_DEFAULT_APPS.append({u'name': u'File Manager'}) | 21 _EXPECTED_DEFAULT_APPS.append({u'name': u'File Manager'}) |
| 22 else: |
| 23 _EXPECTED_DEFAULT_APPS.append({u'name': u'Cloud Print'}) |
| 23 | 24 |
| 24 # Default menu and thumbnail mode preferences are set in | 25 # Default menu and thumbnail mode preferences are set in |
| 25 # ShownSectionsHandler::RegisterUserPrefs. | 26 # ShownSectionsHandler::RegisterUserPrefs. |
| 26 if pyauto.PyUITest.IsChromeOS(): | 27 if pyauto.PyUITest.IsChromeOS(): |
| 27 _EXPECTED_DEFAULT_THUMB_INFO = { | 28 _EXPECTED_DEFAULT_THUMB_INFO = { |
| 28 u'apps': True, | 29 u'apps': True, |
| 29 u'most_visited': False | 30 u'most_visited': False |
| 30 } | 31 } |
| 31 _EXPECTED_DEFAULT_MENU_INFO = { | 32 _EXPECTED_DEFAULT_MENU_INFO = { |
| 32 u'apps': False, | 33 u'apps': False, |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 thumb_info = self.GetNTPThumbnailMode() | 718 thumb_info = self.GetNTPThumbnailMode() |
| 718 expected_thumb_info = { | 719 expected_thumb_info = { |
| 719 u'apps': False, | 720 u'apps': False, |
| 720 u'most_visited': True | 721 u'most_visited': True |
| 721 } | 722 } |
| 722 self._VerifyThumbnailOrMenuMode(thumb_info, expected_thumb_info) | 723 self._VerifyThumbnailOrMenuMode(thumb_info, expected_thumb_info) |
| 723 | 724 |
| 724 | 725 |
| 725 if __name__ == '__main__': | 726 if __name__ == '__main__': |
| 726 pyauto_functional.Main() | 727 pyauto_functional.Main() |
| OLD | NEW |