Remove TabStripModel wrapper use.

BUG=167548
TEST=no functional change


Review URL: https://chromiumcodereview.appspot.com/11953065

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179199 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/ui/browser_focus_uitest.cc b/chrome/browser/ui/browser_focus_uitest.cc
index 1f23a0d4..939391d 100644
--- a/chrome/browser/ui/browser_focus_uitest.cc
+++ b/chrome/browser/ui/browser_focus_uitest.cc
@@ -394,8 +394,9 @@
   ui_test_utils::NavigateToURL(browser(), url);
 
   chrome::Find(browser());
-  ui_test_utils::FindInPage(chrome::GetActiveWebContents(browser()),
-                            ASCIIToUTF16("a"), true, false, NULL, NULL);
+  ui_test_utils::FindInPage(
+      browser()->tab_strip_model()->GetActiveWebContents(),
+      ASCIIToUTF16("a"), true, false, NULL, NULL);
   ASSERT_TRUE(IsViewFocused(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
 
   // Focus the location bar.
@@ -484,7 +485,7 @@
   chrome::FocusLocationBar(browser());
 
   ASSERT_TRUE(content::ExecuteScript(
-      chrome::GetActiveWebContents(browser()),
+      browser()->tab_strip_model()->GetActiveWebContents(),
       "stealFocus();"));
 
   // Make sure the location bar is still focused.
@@ -530,7 +531,7 @@
       // Let's make sure the focus is on the expected element in the page.
       std::string actual;
       ASSERT_TRUE(content::ExecuteScriptAndExtractString(
-          chrome::GetActiveWebContents(browser()),
+          browser()->tab_strip_model()->GetActiveWebContents(),
           "window.domAutomationController.send(getFocusedElement());",
           &actual));
       ASSERT_STREQ(kExpElementIDs[j], actual.c_str());
@@ -546,7 +547,8 @@
             browser(), ui::VKEY_TAB, false, false, false, false,
             content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
             content::NotificationSource(content::Source<RenderViewHost>(
-                chrome::GetActiveWebContents(browser())->GetRenderViewHost())),
+                browser()->tab_strip_model()->GetActiveWebContents()->
+                    GetRenderViewHost())),
             details));
       } else {
         // On the last tab key press, the focus returns to the browser.
@@ -589,7 +591,8 @@
             browser(), ui::VKEY_TAB, false, true, false, false,
             content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
             content::NotificationSource(content::Source<RenderViewHost>(
-                chrome::GetActiveWebContents(browser())->GetRenderViewHost())),
+                browser()->tab_strip_model()->GetActiveWebContents()->
+                    GetRenderViewHost())),
             details));
       } else {
         // On the last tab key press, the focus returns to the browser.
@@ -602,7 +605,7 @@
       // Let's make sure the focus is on the expected element in the page.
       std::string actual;
       ASSERT_TRUE(content::ExecuteScriptAndExtractString(
-          chrome::GetActiveWebContents(browser()),
+          browser()->tab_strip_model()->GetActiveWebContents(),
           "window.domAutomationController.send(getFocusedElement());",
           &actual));
       ASSERT_STREQ(next_element, actual.c_str());
@@ -628,9 +631,9 @@
   ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
 
   // Let's show an interstitial.
-  TestInterstitialPage* interstitial_page =
-      new TestInterstitialPage(chrome::GetActiveWebContents(browser()),
-                               true, GURL("http://interstitial.com"));
+  TestInterstitialPage* interstitial_page = new TestInterstitialPage(
+      browser()->tab_strip_model()->GetActiveWebContents(),
+      true, GURL("http://interstitial.com"));
   // Give some time for the interstitial to show.
   MessageLoop::current()->PostDelayedTask(FROM_HERE,
                                           MessageLoop::QuitClosure(),
@@ -745,13 +748,13 @@
 
   // Page should have focus.
   ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
-  EXPECT_TRUE(chrome::GetActiveWebContents(browser())->GetRenderViewHost()->
-              GetView()->HasFocus());
+  EXPECT_TRUE(browser()->tab_strip_model()->GetActiveWebContents()->
+                  GetRenderViewHost()->GetView()->HasFocus());
 
   // Let's show an interstitial.
-  TestInterstitialPage* interstitial_page =
-      new TestInterstitialPage(chrome::GetActiveWebContents(browser()),
-                               true, GURL("http://interstitial.com"));
+  TestInterstitialPage* interstitial_page = new TestInterstitialPage(
+      browser()->tab_strip_model()->GetActiveWebContents(),
+      true, GURL("http://interstitial.com"));
   // Give some time for the interstitial to show.
   MessageLoop::current()->PostDelayedTask(FROM_HERE,
                                           MessageLoop::QuitClosure(),
@@ -831,26 +834,26 @@
   // Open the history tab, focus should be on the tab contents.
   chrome::ShowHistory(browser());
   ASSERT_NO_FATAL_FAILURE(content::WaitForLoadStop(
-      chrome::GetActiveWebContents(browser())));
+      browser()->tab_strip_model()->GetActiveWebContents()));
   EXPECT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
 
   // Open the new tab, focus should be on the location bar.
   chrome::NewTab(browser());
   ASSERT_NO_FATAL_FAILURE(content::WaitForLoadStop(
-      chrome::GetActiveWebContents(browser())));
+      browser()->tab_strip_model()->GetActiveWebContents()));
   EXPECT_TRUE(IsViewFocused(location_bar_focus_view_id_));
 
   // Open the download tab, focus should be on the tab contents.
   chrome::ShowDownloads(browser());
   ASSERT_NO_FATAL_FAILURE(content::WaitForLoadStop(
-      chrome::GetActiveWebContents(browser())));
+      browser()->tab_strip_model()->GetActiveWebContents()));
   EXPECT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
 
   // Open about:blank, focus should be on the location bar.
   chrome::AddSelectedTabWithURL(browser(), GURL(chrome::kAboutBlankURL),
                                 content::PAGE_TRANSITION_LINK);
   ASSERT_NO_FATAL_FAILURE(content::WaitForLoadStop(
-      chrome::GetActiveWebContents(browser())));
+      browser()->tab_strip_model()->GetActiveWebContents()));
   EXPECT_TRUE(IsViewFocused(location_bar_focus_view_id_));
 }
 
@@ -873,7 +876,8 @@
     content::WindowedNotificationObserver observer(
         content::NOTIFICATION_LOAD_STOP,
         content::Source<NavigationController>(
-            &chrome::GetActiveWebContents(browser())->GetController()));
+            &browser()->tab_strip_model()->GetActiveWebContents()->
+                GetController()));
     chrome::Reload(browser(), CURRENT_TAB);
     observer.Wait();
   }
@@ -888,7 +892,8 @@
     content::WindowedNotificationObserver observer(
         content::NOTIFICATION_LOAD_STOP,
         content::Source<NavigationController>(
-            &chrome::GetActiveWebContents(browser())->GetController()));
+            &browser()->tab_strip_model()->GetActiveWebContents()->
+                GetController()));
     chrome::Reload(browser(), CURRENT_TAB);
     observer.Wait();
   }
@@ -905,12 +910,13 @@
 
   // Open a regular page, crash, reload.
   ui_test_utils::NavigateToURL(browser(), test_server()->GetURL(kSimplePage));
-  content::CrashTab(chrome::GetActiveWebContents(browser()));
+  content::CrashTab(browser()->tab_strip_model()->GetActiveWebContents());
   {
     content::WindowedNotificationObserver observer(
         content::NOTIFICATION_LOAD_STOP,
         content::Source<NavigationController>(
-            &chrome::GetActiveWebContents(browser())->GetController()));
+            &browser()->tab_strip_model()->GetActiveWebContents()->
+                GetController()));
     chrome::Reload(browser(), CURRENT_TAB);
     observer.Wait();
   }