Lines Matching defs:windows
84 void ReadWindows(std::vector<SessionWindow*>* windows) {
90 helper_.ReadWindows(windows);
110 ScopedVector<SessionWindow> windows;
111 ReadWindows(&(windows.get()));
113 EXPECT_EQ(1U, windows->size());
116 EXPECT_EQ(1U, windows[0]->tabs.size());
120 SessionTab* tab = windows[0]->tabs[0];
156 ScopedVector<SessionWindow> windows;
157 ReadWindows(&(windows.get()));
159 ASSERT_EQ(1U, windows->size());
160 ASSERT_TRUE(window_bounds == windows[0]->bounds);
161 ASSERT_EQ(0, windows[0]->selected_tab_index);
162 ASSERT_EQ(window_id.id(), windows[0]->window_id.id());
163 ASSERT_EQ(1U, windows[0]->tabs.size());
164 ASSERT_EQ(Browser::TYPE_NORMAL, windows[0]->type);
166 SessionTab* tab = windows[0]->tabs[0];
185 ScopedVector<SessionWindow> windows;
186 ReadWindows(&(windows.get()));
188 helper_.AssertSingleWindowWithSingleTab(windows.get(), 1);
210 ScopedVector<SessionWindow> windows;
211 ReadWindows(&(windows.get()));
213 ASSERT_EQ(1U, windows->size());
214 ASSERT_EQ(0, windows[0]->selected_tab_index);
215 ASSERT_EQ(window_id.id(), windows[0]->window_id.id());
216 ASSERT_EQ(1U, windows[0]->tabs.size());
218 SessionTab* tab = windows[0]->tabs[0];
241 ScopedVector<SessionWindow> windows;
242 ReadWindows(&(windows.get()));
244 ASSERT_EQ(1U, windows->size());
245 ASSERT_EQ(0, windows[0]->selected_tab_index);
246 ASSERT_EQ(1U, windows[0]->tabs.size());
248 SessionTab* tab = windows[0]->tabs[0];
279 ScopedVector<SessionWindow> windows;
280 ReadWindows(&(windows.get()));
282 ASSERT_EQ(2U, windows->size());
283 ASSERT_EQ(0, windows[0]->selected_tab_index);
284 ASSERT_EQ(0, windows[1]->selected_tab_index);
285 ASSERT_EQ(1U, windows[0]->tabs.size());
286 ASSERT_EQ(1U, windows[1]->tabs.size());
290 if (windows[0]->window_id.id() == window_id.id()) {
291 ASSERT_EQ(window2_id.id(), windows[1]->window_id.id());
292 ASSERT_FALSE(windows[0]->is_maximized);
293 ASSERT_TRUE(windows[1]->is_maximized);
294 rt1 = windows[0]->tabs[0];
295 rt2 = windows[1]->tabs[0];
297 ASSERT_EQ(window2_id.id(), windows[0]->window_id.id());
298 ASSERT_EQ(window_id.id(), windows[1]->window_id.id());
299 ASSERT_TRUE(windows[0]->is_maximized);
300 ASSERT_FALSE(windows[1]->is_maximized);
301 rt1 = windows[1]->tabs[0];
302 rt2 = windows[0]->tabs[0];
330 ScopedVector<SessionWindow> windows;
331 ReadWindows(&(windows.get()));
333 ASSERT_EQ(1U, windows->size());
334 ASSERT_EQ(0, windows[0]->selected_tab_index);
335 ASSERT_EQ(1U, windows[0]->tabs.size());
336 ASSERT_EQ(window_id.id(), windows[0]->window_id.id());
338 SessionTab* tab = windows[0]->tabs[0];
363 ScopedVector<SessionWindow> windows;
364 ReadWindows(&(windows.get()));
366 ASSERT_EQ(1U, windows->size());
367 ASSERT_EQ(0, windows[0]->selected_tab_index);
368 ASSERT_EQ(window_id.id(), windows[0]->window_id.id());
369 ASSERT_EQ(2U, windows[0]->tabs.size());
371 SessionTab* tab = windows[0]->tabs[0];
375 tab = windows[0]->tabs[1];
406 ScopedVector<SessionWindow> windows;
407 ReadWindows(&(windows.get()));
409 ASSERT_EQ(1U, windows->size());
410 ASSERT_EQ(0, windows[0]->selected_tab_index);
411 ASSERT_EQ(window_id.id(), windows[0]->window_id.id());
412 ASSERT_EQ(1U, windows[0]->tabs.size());
414 SessionTab* tab = windows[0]->tabs[0];
445 ScopedVector<SessionWindow> windows;
446 ReadWindows(&(windows.get()));
448 ASSERT_EQ(1U, windows->size());
449 ASSERT_EQ(0, windows[0]->selected_tab_index);
450 ASSERT_EQ(window_id.id(), windows[0]->window_id.id());
451 ASSERT_EQ(1U, windows[0]->tabs.size());
453 SessionTab* tab = windows[0]->tabs[0];
484 ScopedVector<SessionWindow> windows;
485 ReadWindows(&(windows.get()));
487 ASSERT_EQ(2U, windows->size());
488 int normal_index = windows[0]->type == Browser::TYPE_NORMAL ?
491 ASSERT_EQ(0, windows[normal_index]->selected_tab_index);
492 ASSERT_EQ(window_id.id(), windows[normal_index]->window_id.id());
493 ASSERT_EQ(1U, windows[normal_index]->tabs.size());
495 SessionTab* tab = windows[normal_index]->tabs[0];
499 ASSERT_EQ(0, windows[popup_index]->selected_tab_index);
500 ASSERT_EQ(window2_id.id(), windows[popup_index]->window_id.id());
501 ASSERT_EQ(1U, windows[popup_index]->tabs.size());
503 tab = windows[popup_index]->tabs[0];
526 ScopedVector<SessionWindow> windows;
527 ReadWindows(&(windows.get()));
529 ASSERT_EQ(1U, windows->size());
530 ASSERT_EQ(0, windows[0]->selected_tab_index);
531 ASSERT_EQ(window_id.id(), windows[0]->window_id.id());
532 ASSERT_EQ(1U, windows[0]->tabs.size());
535 EXPECT_TRUE(windows[0]->tabs[0]->extension_app_id.empty());
538 SessionTab* tab = windows[0]->tabs[0];
567 ScopedVector<SessionWindow> windows;
568 ReadWindows(&(windows.get()));
570 ASSERT_EQ(0U, windows->size());
597 ScopedVector<SessionWindow> windows;
598 ReadWindows(&(windows.get()));
600 helper_.AssertSingleWindowWithSingleTab(windows.get(), 1);
601 EXPECT_TRUE(app_id == windows[0]->tabs[0]->extension_app_id);
611 void OnGotSession(int handle, std::vector<SessionWindow*>* windows) {
612 EXPECT_EQ(1U, windows->size());
613 EXPECT_EQ(2U, (*windows)[0]->tabs.size());
614 EXPECT_EQ(2U, (*windows)[0]->tabs[0]->navigations.size());
616 (*windows)[0]->tabs[0]->navigations[0].virtual_url());
618 (*windows)[0]->tabs[0]->navigations[1].virtual_url());
619 EXPECT_EQ(2U, (*windows)[0]->tabs[1]->navigations.size());
621 (*windows)[0]->tabs[1]->navigations[0].virtual_url());
623 (*windows)[0]->tabs[1]->navigations[1].virtual_url());
662 ScopedVector<SessionWindow> windows;
663 ReadWindows(&(windows.get()));
665 ASSERT_TRUE(windows->empty());