Chromium Code Reviews| 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 ] | 19 ] |
| 20 if pyauto.PyUITest.IsChromeOS(): | 20 if pyauto.PyUITest.IsChromeOS(): |
| 21 _EXPECTED_DEFAULT_APPS.append({u'name': u'Get Started'}) | 21 _EXPECTED_DEFAULT_APPS.append({u'name': u'Get Started'}) |
| 22 _EXPECTED_DEFAULT_APPS.append({u'name': u'File Manager'}) | |
|
Nirnimesh
2011/05/03 22:06:50
If you don't mind could you run these tests to con
dgozman
2011/05/24 12:55:21
Ok, I run these tests. But they succeed, if I comm
Nirnimesh
2011/05/24 17:29:43
Did you emerge chromeos-chrome after commenting 'G
| |
| 22 | 23 |
| 23 # Default menu and thumbnail mode preferences are set in | 24 # Default menu and thumbnail mode preferences are set in |
| 24 # ShownSectionsHandler::RegisterUserPrefs. | 25 # ShownSectionsHandler::RegisterUserPrefs. |
| 25 if pyauto.PyUITest.IsChromeOS(): | 26 if pyauto.PyUITest.IsChromeOS(): |
| 26 _EXPECTED_DEFAULT_THUMB_INFO = { | 27 _EXPECTED_DEFAULT_THUMB_INFO = { |
| 27 u'apps': True, | 28 u'apps': True, |
| 28 u'most_visited': False | 29 u'most_visited': False |
| 29 } | 30 } |
| 30 _EXPECTED_DEFAULT_MENU_INFO = { | 31 _EXPECTED_DEFAULT_MENU_INFO = { |
| 31 u'apps': False, | 32 u'apps': False, |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 716 thumb_info = self.GetNTPThumbnailMode() | 717 thumb_info = self.GetNTPThumbnailMode() |
| 717 expected_thumb_info = { | 718 expected_thumb_info = { |
| 718 u'apps': False, | 719 u'apps': False, |
| 719 u'most_visited': True | 720 u'most_visited': True |
| 720 } | 721 } |
| 721 self._VerifyThumbnailOrMenuMode(thumb_info, expected_thumb_info) | 722 self._VerifyThumbnailOrMenuMode(thumb_info, expected_thumb_info) |
| 722 | 723 |
| 723 | 724 |
| 724 if __name__ == '__main__': | 725 if __name__ == '__main__': |
| 725 pyauto_functional.Main() | 726 pyauto_functional.Main() |
| OLD | NEW |