ASSERT_EQ(1, tab_strip->count());
content::WebContents* web_contents = tab_strip->GetWebContentsAt(0);
EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), web_contents->GetURL());
- EXPECT_EQ(1U,
- InfoBarService::FromWebContents(web_contents)->infobar_count());
+ InfoBarService* infobar_service =
+ InfoBarService::FromWebContents(web_contents);
+ EXPECT_EQ(1U, infobar_service->infobar_count());
// The profile which normally opens last open pages displays the new tab page.
ASSERT_EQ(1u, chrome::GetBrowserCount(profile_last,
ASSERT_EQ(1, tab_strip->count());
web_contents = tab_strip->GetWebContentsAt(0);
EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), web_contents->GetURL());
- EXPECT_EQ(1U,
- InfoBarService::FromWebContents(web_contents)->infobar_count());
+ infobar_service = InfoBarService::FromWebContents(web_contents);
+ EXPECT_EQ(1U, infobar_service->infobar_count());
// The profile which normally opens URLs displays the new tab page.
ASSERT_EQ(1u, chrome::GetBrowserCount(profile_urls,
ASSERT_EQ(1, tab_strip->count());
web_contents = tab_strip->GetWebContentsAt(0);
EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), web_contents->GetURL());
- EXPECT_EQ(1U,
- InfoBarService::FromWebContents(web_contents)->infobar_count());
+ infobar_service = InfoBarService::FromWebContents(web_contents);
+ EXPECT_EQ(1U, infobar_service->infobar_count());
}
class ManagedModeBrowserCreatorTest : public InProcessBrowserTest {