Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / startup / startup_browser_creator_browsertest.cc
index 884a709..4cd3edc 100644 (file)
@@ -938,8 +938,9 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, ProfilesLaunchedAfterCrash) {
   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,
@@ -950,8 +951,8 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, ProfilesLaunchedAfterCrash) {
   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,
@@ -962,8 +963,8 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, ProfilesLaunchedAfterCrash) {
   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 {