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

Side by Side Diff: functional/browser.py

Issue 7068032: Adding a pyauto test, testPopupSharesProcessWithIncognito, in browser.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/test/
Patch Set: '' Created 9 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/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 import re 7 import re
8 import types 8 import types
9 9
10 import pyauto_functional # Must be imported before pyauto 10 import pyauto_functional # Must be imported before pyauto
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 self.GetBrowserWindow(0).GetTab(0).Reload() 222 self.GetBrowserWindow(0).GetTab(0).Reload()
223 self.GetBrowserWindow(1).GetTab(0).Reload() 223 self.GetBrowserWindow(1).GetTab(0).Reload()
224 # Check if both are sharing a process id. 224 # Check if both are sharing a process id.
225 self.assertEquals( 225 self.assertEquals(
226 self.GetBrowserInfo()['windows'][0]['tabs'][0]['renderer_pid'], 226 self.GetBrowserInfo()['windows'][0]['tabs'][0]['renderer_pid'],
227 self.GetBrowserInfo()['windows'][1]['tabs'][0]['renderer_pid']) 227 self.GetBrowserInfo()['windows'][1]['tabs'][0]['renderer_pid'])
228 # The shared process id should be different from the previous one. 228 # The shared process id should be different from the previous one.
229 self.assertNotEqual(shared_pid, 229 self.assertNotEqual(shared_pid,
230 self.GetBrowserInfo()['windows'][0]['tabs'][0]['renderer_pid']) 230 self.GetBrowserInfo()['windows'][0]['tabs'][0]['renderer_pid'])
231 231
232 def testPopupSharesProcessWithIncognito(self):
anantha 2011/05/26 23:10:57 can we rename to: testPopupSharesSameProcessInInco
jasneet 2011/06/03 21:11:08 Done.
233 "Launch Popup in incognito window"
anantha 2011/05/26 23:10:57 Please give a one line description of what this te
jasneet 2011/06/03 21:11:08 Done.
234 self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW)
235 file_url = self.GetFileURLForPath(os.path.join(
Nirnimesh 2011/05/27 07:16:13 self.GetFileURLForDataPath('popup_blocker', 'popup
jasneet 2011/06/03 21:11:08 Done.
236 self.DataDir(), 'popup_blocker', 'popup-window-open.html'))
237 self.NavigateToURL(file_url, 1, 0)
238 self.UnblockAndLaunchBlockedPopup(0, tab_index=0, windex=1)
Nirnimesh 2011/05/27 07:16:13 The next line should be a comment, not a string
jasneet 2011/06/03 21:11:08 Deleted this comment
239 "Verify parent incognito and popup share same process id"
anantha 2011/05/26 23:10:57 Please get rid of these variables. Instead include
jasneet 2011/06/03 21:11:08 Done.
240 incog_pid = self.GetBrowserInfo()['windows'][1]['tabs'][0]['renderer_pid']
241 popup_pid = self.GetBrowserInfo()['windows'][2]['tabs'][0]['renderer_pid']
242 self.assertEquals(popup_pid, incog_pid,
243 msg='Incognito window and popup are not sharing a process id.')
232 244
233 if __name__ == '__main__': 245 if __name__ == '__main__':
234 pyauto_functional.Main() 246 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