Home | History | Annotate | Download | only in sessions

Lines Matching defs:Tab

35 typedef TabRestoreService::Tab Tab;
125 // Adds a window with one tab and url to the profile's session service.
126 // If |pinned| is true, the tab is marked as pinned in the session service.
146 // is configured with a single window with a single tab pointing at url1_ by
148 // tab is marked as pinned in the session service.
204 // Have the service record the tab.
212 ASSERT_EQ(TabRestoreService::TAB, entry->type);
213 Tab* tab = static_cast<Tab*>(entry);
214 EXPECT_FALSE(tab->pinned);
215 EXPECT_TRUE(tab->extension_app_id.empty());
216 ASSERT_EQ(3U, tab->navigations.size());
217 EXPECT_TRUE(url1_ == tab->navigations[0].virtual_url());
218 EXPECT_TRUE(url2_ == tab->navigations[1].virtual_url());
219 EXPECT_TRUE(url3_ == tab->navigations[2].virtual_url());
220 EXPECT_EQ("", tab->user_agent_override);
221 EXPECT_EQ(2, tab->current_navigation_index);
223 tab->timestamp.ToInternalValue());
236 ASSERT_EQ(TabRestoreService::TAB, entry->type);
237 tab = static_cast<Tab*>(entry);
238 EXPECT_FALSE(tab->pinned);
239 ASSERT_EQ(3U, tab->navigations.size());
240 EXPECT_EQ(url1_, tab->navigations[0].virtual_url());
241 EXPECT_EQ(url2_, tab->navigations[1].virtual_url());
242 EXPECT_EQ(url3_, tab->navigations[2].virtual_url());
243 EXPECT_EQ(user_agent_override_, tab->user_agent_override);
244 EXPECT_EQ(1, tab->current_navigation_index);
246 tab->timestamp.ToInternalValue());
249 // Make sure TabRestoreService doesn't create an entry for a tab with no
256 // Tests restoring a single tab.
260 // Have the service record the tab.
271 ASSERT_EQ(TabRestoreService::TAB, entry->type);
272 Tab* tab = static_cast<Tab*>(entry);
273 EXPECT_FALSE(tab->pinned);
274 ASSERT_EQ(3U, tab->navigations.size());
275 EXPECT_TRUE(url1_ == tab->navigations[0].virtual_url());
276 EXPECT_TRUE(url2_ == tab->navigations[1].virtual_url());
277 EXPECT_TRUE(url3_ == tab->navigations[2].virtual_url());
278 EXPECT_EQ(2, tab->current_navigation_index);
280 tab->timestamp.ToInternalValue());
283 // Tests restoring a single pinned tab.
287 // Have the service record the tab.
293 // We have to explicitly mark the tab as pinned as there is no browser for
296 ASSERT_EQ(TabRestoreService::TAB, entry->type);
297 Tab* tab = static_cast<Tab*>(entry);
298 tab->pinned = true;
300 tab->extension_app_id = extension_app_id;
310 ASSERT_EQ(TabRestoreService::TAB, entry->type);
311 tab = static_cast<Tab*>(entry);
312 EXPECT_TRUE(tab->pinned);
313 ASSERT_EQ(3U, tab->navigations.size());
314 EXPECT_TRUE(url1_ == tab->navigations[0].virtual_url());
315 EXPECT_TRUE(url2_ == tab->navigations[1].virtual_url());
316 EXPECT_TRUE(url3_ == tab->navigations[2].virtual_url());
317 EXPECT_EQ(2, tab->current_navigation_index);
318 EXPECT_TRUE(extension_app_id == tab->extension_app_id);
328 // Have the service record the tab.
339 ASSERT_EQ(TabRestoreService::TAB, restored_entry->type);
341 const Tab* restored_tab =
342 static_cast<const Tab*>(restored_entry);
355 // Have the service record the tab.
383 // Make sure we get back one entry with one tab whose url is url1.
441 // the tab restore service. The previous session entry should be first.
456 // Then the closed tab.
458 ASSERT_EQ(TabRestoreService::TAB, entry->type);
459 Tab* tab = static_cast<Tab*>(entry);
460 ASSERT_FALSE(tab->pinned);
461 ASSERT_EQ(3U, tab->navigations.size());
462 EXPECT_EQ(2, tab->current_navigation_index);
464 tab->timestamp.ToInternalValue());
465 EXPECT_TRUE(url1_ == tab->navigations[0].virtual_url());
466 EXPECT_TRUE(url2_ == tab->navigations[1].virtual_url());
467 EXPECT_TRUE(url3_ == tab->navigations[2].virtual_url());
484 // the tab restore service. The previous session entry should be first.
498 // Then the closed tab.
500 ASSERT_EQ(TabRestoreService::TAB, entry->type);
501 Tab* tab = static_cast<Tab*>(entry);
502 ASSERT_FALSE(tab->pinned);
503 ASSERT_EQ(3U, tab->navigations.size());
504 EXPECT_EQ(2, tab->current_navigation_index);
505 EXPECT_TRUE(url1_ == tab->navigations[0].virtual_url());
506 EXPECT_TRUE(url2_ == tab->navigations[1].virtual_url());
507 EXPECT_TRUE(url3_ == tab->navigations[2].virtual_url());
551 // Have the service record the tab.
560 // |entry|/|tab| doesn't survive after RecreateService().
562 ASSERT_EQ(TabRestoreService::TAB, entry->type);
563 Tab* tab = static_cast<Tab*>(entry);
564 tab->timestamp = tab_timestamp;
565 old_navigations = tab->navigations;
583 ASSERT_EQ(TabRestoreService::TAB, restored_entry->type);
584 Tab* restored_tab =
585 static_cast<Tab*>(restored_entry);
599 // Have the service record the tab.
608 // |entry|/|tab| doesn't survive after RecreateService().
610 ASSERT_EQ(TabRestoreService::TAB, entry->type);
611 Tab* tab = static_cast<Tab*>(entry);
612 old_navigations = tab->navigations;
630 ASSERT_EQ(TabRestoreService::TAB, restored_entry->type);
631 Tab* restored_tab =
632 static_cast<Tab*>(restored_entry);
650 Tab* tab = new Tab();
651 tab->navigations.push_back(navigation);
652 tab->current_navigation_index = 0;
654 mutable_entries()->push_back(tab);
670 Tab* tab = new Tab();
671 tab->navigations.push_back(navigation);
672 tab->current_navigation_index = 0;
673 mutable_entries()->push_front(tab);
678 static_cast<Tab*>(service_->entries().front())->
683 chrome::kChromeUINewTabURL, "New tab");
685 tab = new Tab();
686 tab->navigations.push_back(navigation);
687 tab->current_navigation_index = 0;
688 mutable_entries()->push_front(tab);
694 static_cast<Tab*>(service_->entries().front())->
698 tab = new Tab();
699 tab->pinned = true;
700 tab->current_navigation_index = 0;
701 tab->navigations.push_back(navigation);
702 mutable_entries()->push_front(tab);
707 static_cast<Tab*>(service_->entries().front())->
714 tab = new Tab();
715 tab->current_navigation_index = 1;
716 tab->navigations.push_back(navigation);
717 tab->navigations.push_back(navigation);
718 mutable_entries()->push_front(tab);
723 static_cast<Tab*>(service_->entries().front())->