Home | History | Annotate | Download | only in browser

Lines Matching full:browser_proxy

13 #include "chrome/test/automation/browser_proxy.h"
52 scoped_refptr<BrowserProxy> browser_proxy;
54 browser_proxy = automation()->GetBrowserWindow(0);
57 browser_proxy = automation()->GetBrowserWindow(expected_window_index);
59 ASSERT_TRUE(browser_proxy.get());
60 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
64 ASSERT_TRUE(browser_proxy->RunCommand(IDC_RESTORE_TAB));
70 browser_proxy = automation()->GetBrowserWindow(expected_window_index);
71 ASSERT_TRUE(browser_proxy.get());
74 ASSERT_TRUE(browser_proxy->GetTabCount(&new_tab_count));
79 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
82 browser_proxy->GetTab(expected_tabstrip_index));
89 CheckActiveWindow(browser_proxy.get());
141 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
142 ASSERT_TRUE(browser_proxy.get());
145 ASSERT_TRUE(browser_proxy->GetTabCount(&starting_tab_count));
146 int tab_count = AddSomeTabs(browser_proxy.get(), 1);
149 scoped_refptr<TabProxy> new_tab(browser_proxy->GetTab(closed_tab_index));
156 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
162 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
171 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
172 ASSERT_TRUE(browser_proxy.get());
175 ASSERT_TRUE(browser_proxy->GetTabCount(&starting_tab_count));
176 int tab_count = AddSomeTabs(browser_proxy.get(), 3);
180 scoped_refptr<TabProxy> new_tab(browser_proxy->GetTab(closed_tab_index));
187 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
193 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
202 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
203 ASSERT_TRUE(browser_proxy.get());
208 CheckActiveWindow(browser_proxy.get());
211 ASSERT_TRUE(browser_proxy->GetTabCount(&starting_tab_count));
212 int tab_count = AddSomeTabs(browser_proxy.get(), 3);
216 scoped_refptr<TabProxy> new_tab(browser_proxy->GetTab(closed_tab_index));
223 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
238 CheckActiveWindow(browser_proxy.get());
239 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
248 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
249 ASSERT_TRUE(browser_proxy.get());
250 CheckActiveWindow(browser_proxy.get());
253 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
257 scoped_refptr<TabProxy> tab_to_close(browser_proxy->GetTab(0));
260 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
264 scoped_refptr<TabProxy> tab_proxy(browser_proxy->GetTab(0));
282 browser_proxy = NULL;
287 browser_proxy = automation()->GetBrowserWindow(1);
288 ASSERT_TRUE(browser_proxy.get());
289 CheckActiveWindow(browser_proxy.get());
290 tab_proxy = browser_proxy->GetActiveTab();
300 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
301 ASSERT_TRUE(browser_proxy.get());
302 CheckActiveWindow(browser_proxy.get());
306 ASSERT_TRUE(browser_proxy->GetTabCount(&starting_tab_count));
307 AddSomeTabs(browser_proxy.get(), 2);
309 ASSERT_TRUE(browser_proxy->GetTabCount(&current_tab_count));
313 scoped_refptr<TabProxy> tab_to_close(browser_proxy->GetTab(0));
316 ASSERT_TRUE(browser_proxy->GetTabCount(&current_tab_count));
321 ASSERT_TRUE(browser_proxy->GetTabCount(&current_tab_count));
326 ASSERT_TRUE(browser_proxy->IsMenuCommandEnabled(IDC_RESTORE_TAB, &enabled));
333 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
334 ASSERT_TRUE(browser_proxy.get());
335 CheckActiveWindow(browser_proxy.get());
338 ASSERT_TRUE(browser_proxy->GetTabCount(&starting_tab_count));
339 int tab_count = AddSomeTabs(browser_proxy.get(), 3);
343 scoped_refptr<TabProxy> new_tab(browser_proxy->GetTab(closed_tab_index));
350 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
362 EXPECT_TRUE(CloseBrowser(browser_proxy.get(), &application_closing));
368 browser_proxy = NULL;
373 browser_proxy = automation()->GetBrowserWindow(1);
374 ASSERT_TRUE(browser_proxy.get());
375 CheckActiveWindow(browser_proxy.get());
376 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
381 CheckActiveWindow(browser_proxy.get());
382 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
390 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
391 ASSERT_TRUE(browser_proxy.get());
392 CheckActiveWindow(browser_proxy.get());
395 ASSERT_TRUE(browser_proxy->GetTabCount(&starting_tab_count));
396 int tab_count = AddSomeTabs(browser_proxy.get(), 2);
399 scoped_refptr<TabProxy> tab_proxy(browser_proxy->GetTab(tab_count - 1));
412 scoped_refptr<TabProxy> tab_to_close(browser_proxy->GetTab(0));
415 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
419 tab_proxy = browser_proxy->GetTab(0);
423 browser_proxy = NULL;
428 browser_proxy = automation()->GetBrowserWindow(1);
429 ASSERT_TRUE(browser_proxy.get());
430 CheckActiveWindow(browser_proxy.get());
431 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
437 CheckActiveWindow(browser_proxy.get());
438 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
453 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
454 ASSERT_TRUE(browser_proxy.get());
456 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
459 ASSERT_TRUE(browser_proxy->AppendTab(http_url1));
461 ASSERT_TRUE(browser_proxy->GetTabCount(&new_tab_count));
463 scoped_refptr<TabProxy> tab(browser_proxy->GetTab(tab_count - 1));
476 ASSERT_TRUE(browser_proxy->AppendTab(http_url2));
480 tab = browser_proxy->GetActiveTab();
500 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
501 ASSERT_TRUE(browser_proxy.get());
503 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count));
506 ASSERT_TRUE(browser_proxy->AppendTab(http_url1));
508 ASSERT_TRUE(browser_proxy->GetTabCount(&new_tab_count));
510 scoped_refptr<TabProxy> tab(browser_proxy->GetTab(tab_count - 1));
525 ASSERT_TRUE(browser_proxy->AppendTab(http_url2));
529 tab = browser_proxy->GetActiveTab();
554 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
555 ASSERT_TRUE(browser_proxy.get());
557 ASSERT_TRUE(browser_proxy->GetTabCount(&initial_tab_count));
558 ASSERT_TRUE(browser_proxy->AppendTab(url1_));
559 ASSERT_TRUE(browser_proxy->WaitForTabCountToBecome(initial_tab_count + 1));
560 scoped_refptr<TabProxy> new_tab(browser_proxy->GetTab(initial_tab_count));
563 ASSERT_TRUE(browser_proxy->AppendTab(url2_));
564 ASSERT_TRUE(browser_proxy->WaitForTabCountToBecome(initial_tab_count + 2));
565 new_tab = browser_proxy->GetTab(initial_tab_count + 1);
570 ASSERT_TRUE(browser_proxy->RunCommand(IDC_CLOSE_WINDOW));
571 browser_proxy = NULL;
577 browser_proxy = automation()->GetBrowserWindow(0);
578 ASSERT_TRUE(browser_proxy.get());
579 ASSERT_TRUE(browser_proxy->RunCommand(IDC_RESTORE_TAB));
583 browser_proxy = automation()->GetBrowserWindow(1);
585 EXPECT_TRUE(browser_proxy->GetTabCount(&tab_count));
589 browser_proxy->GetTab(initial_tab_count));
597 restored_tab_proxy = browser_proxy->GetTab(initial_tab_count + 1);