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

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

Issue 10830193: Remove SWIGged use of BrowserProxy and TabProxy from PyAuto tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
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 logging 6 import logging
7 import os 7 import os
8 import re 8 import re
9 import types 9 import types
10 10
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 self.FindInPage('popup', tab_index=0, windex=1)['match_count']) 181 self.FindInPage('popup', tab_index=0, windex=1)['match_count'])
182 # Check if they are sharing a process id. 182 # Check if they are sharing a process id.
183 self.assertEquals( 183 self.assertEquals(
184 self.GetBrowserInfo()['windows'][0]['tabs'][0]['renderer_pid'], 184 self.GetBrowserInfo()['windows'][0]['tabs'][0]['renderer_pid'],
185 self.GetBrowserInfo()['windows'][1]['tabs'][0]['renderer_pid']) 185 self.GetBrowserInfo()['windows'][1]['tabs'][0]['renderer_pid'])
186 shared_pid = self.GetBrowserInfo()['windows'][0]['tabs'][0]['renderer_pid'] 186 shared_pid = self.GetBrowserInfo()['windows'][0]['tabs'][0]['renderer_pid']
187 # This method would fail if the renderers are not killed. 187 # This method would fail if the renderers are not killed.
188 self.KillRendererProcess(shared_pid) 188 self.KillRendererProcess(shared_pid)
189 189
190 # Reload the parent and popup windows. 190 # Reload the parent and popup windows.
191 self.GetBrowserWindow(0).GetTab(0).Reload() 191 self.ReloadTab(0, 0)
Nirnimesh 2012/08/07 00:37:35 prefer named args, tab_index=0, windex=0 Or since
craigdh 2012/08/07 21:08:51 Done.
192 self.GetBrowserWindow(1).GetTab(0).Reload() 192 self.ReloadTab(0, 1)
Nirnimesh 2012/08/07 00:37:35 windex=1
craigdh 2012/08/07 21:08:51 Done.
193 # Check if both are sharing a process id. 193 # Check if both are sharing a process id.
194 self.assertEquals( 194 self.assertEquals(
195 self.GetBrowserInfo()['windows'][0]['tabs'][0]['renderer_pid'], 195 self.GetBrowserInfo()['windows'][0]['tabs'][0]['renderer_pid'],
196 self.GetBrowserInfo()['windows'][1]['tabs'][0]['renderer_pid']) 196 self.GetBrowserInfo()['windows'][1]['tabs'][0]['renderer_pid'])
197 # The shared process id should be different from the previous one. 197 # The shared process id should be different from the previous one.
198 self.assertNotEqual(shared_pid, 198 self.assertNotEqual(shared_pid,
199 self.GetBrowserInfo()['windows'][0]['tabs'][0]['renderer_pid']) 199 self.GetBrowserInfo()['windows'][0]['tabs'][0]['renderer_pid'])
200 200
201 if __name__ == '__main__': 201 if __name__ == '__main__':
202 pyauto_functional.Main() 202 pyauto_functional.Main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698