Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Side by Side Diff: chrome/test/functional/protector.py

Issue 10178011: [protector,win] Fix protector.ProtectorSessionStartupTest.testSessionStartupPrefMigrationFromHomepa… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 pyauto_functional # Must be imported first 6 import pyauto_functional # Must be imported first
7 import pyauto 7 import pyauto
8 import test_utils 8 import test_utils
9 9
10 import json 10 import json
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 prefs = self._LoadPreferences() 166 prefs = self._LoadPreferences()
167 if startup_type is None: 167 if startup_type is None:
168 del prefs['session']['restore_on_startup'] 168 del prefs['session']['restore_on_startup']
169 else: 169 else:
170 prefs['session']['restore_on_startup'] = startup_type 170 prefs['session']['restore_on_startup'] = startup_type
171 171
172 if startup_urls is not None: 172 if startup_urls is not None:
173 prefs['session']['urls_to_restore_on_startup'] = startup_urls 173 prefs['session']['urls_to_restore_on_startup'] = startup_urls
174 if homepage is not None: 174 if homepage is not None:
175 prefs['homepage'] = homepage 175 prefs['homepage'] = homepage
176 prefs['homepage_is_newtabpage'] = False
176 if delete_migrated_pref: 177 if delete_migrated_pref:
177 del prefs['session']['restore_on_startup_migrated'] 178 del prefs['session']['restore_on_startup_migrated']
178 self._WritePreferences(prefs) 179 self._WritePreferences(prefs)
179 180
180 def _ChangePinnedTabsPrefs(self, pinned_tabs): 181 def _ChangePinnedTabsPrefs(self, pinned_tabs):
181 """Changes the list of pinned tabs. 182 """Changes the list of pinned tabs.
182 183
183 Args: 184 Args:
184 pinned_tabs: list(str) with a list of pinned tabs URLs. 185 pinned_tabs: list(str) with a list of pinned tabs URLs.
185 """ 186 """
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 pre_launch_hook=lambda: self._ChangeHomepage(new_homepage, False, True)) 767 pre_launch_hook=lambda: self._ChangeHomepage(new_homepage, False, True))
767 # Not showing the change. 768 # Not showing the change.
768 self.assertFalse(self.GetProtectorState()['showing_change']) 769 self.assertFalse(self.GetProtectorState()['showing_change'])
769 # New values must be active. 770 # New values must be active.
770 self.assertEquals(new_homepage, self.GetPrefsInfo().Prefs(pyauto.kHomePage)) 771 self.assertEquals(new_homepage, self.GetPrefsInfo().Prefs(pyauto.kHomePage))
771 self.assertEquals(True, self.GetPrefsInfo().Prefs(pyauto.kShowHomeButton)) 772 self.assertEquals(True, self.GetPrefsInfo().Prefs(pyauto.kShowHomeButton))
772 773
773 774
774 if __name__ == '__main__': 775 if __name__ == '__main__':
775 pyauto_functional.Main() 776 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698