Index: chrome/browser/translate/translate_manager_browsertest.cc |
diff --git a/chrome/browser/translate/translate_manager_browsertest.cc b/chrome/browser/translate/translate_manager_browsertest.cc |
index 0900f3f82a7c92d5f99b3f92172acfbb19b68af8..b9c4c87042714f31fea81ec8ba4c8624a6a7d2a3 100644 |
--- a/chrome/browser/translate/translate_manager_browsertest.cc |
+++ b/chrome/browser/translate/translate_manager_browsertest.cc |
@@ -10,6 +10,7 @@ |
#include "base/utf_string_conversions.h" |
#include "base/stringprintf.h" |
#include "chrome/app/chrome_command_ids.h" |
+#include "chrome/browser/infobars/infobar_tab_helper.h" |
#include "chrome/browser/prefs/pref_change_registrar.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/tab_contents/infobar.h" |
@@ -90,8 +91,8 @@ class TranslateManagerTest : public TabContentsWrapperTestHarness, |
// Returns the translate infobar if there is 1 infobar and it is a translate |
// infobar. |
TranslateInfoBarDelegate* GetTranslateInfoBar() { |
- return (contents_wrapper()->infobar_count() == 1) ? |
- contents_wrapper()->GetInfoBarDelegateAt(0)-> |
+ return (contents_wrapper()->infobar_tab_helper()->infobar_count() == 1) ? |
Peter Kasting
2011/08/31 18:47:32
Nit: Factor this infobar_tab_helper() out to a tem
|
+ contents_wrapper()->infobar_tab_helper()->GetInfoBarDelegateAt(0)-> |
AsTranslateInfoBarDelegate() : NULL; |
} |
@@ -102,7 +103,7 @@ class TranslateManagerTest : public TabContentsWrapperTestHarness, |
if (!infobar) |
return false; |
infobar->InfoBarDismissed(); // Simulates closing the infobar. |
- contents_wrapper()->RemoveInfoBar(infobar); |
+ contents_wrapper()->infobar_tab_helper()->RemoveInfoBar(infobar); |
return true; |
} |
@@ -135,7 +136,7 @@ class TranslateManagerTest : public TabContentsWrapperTestHarness, |
if (!infobar) |
return false; |
infobar->TranslationDeclined(); |
- contents_wrapper()->RemoveInfoBar(infobar); |
+ contents_wrapper()->infobar_tab_helper()->RemoveInfoBar(infobar); |
return true; |
} |
@@ -632,18 +633,18 @@ TEST_F(TranslateManagerTest, MultipleOnPageContents) { |
// Simulate clicking 'Nope' (don't translate). |
EXPECT_TRUE(DenyTranslation()); |
- EXPECT_EQ(0U, contents_wrapper()->infobar_count()); |
+ EXPECT_EQ(0U, contents_wrapper()->infobar_tab_helper()->infobar_count()); |
Peter Kasting
2011/08/31 18:47:32
Nit: Factor this infobar_tab_helper() out to a tem
|
// Send a new PageContents, we should not show an infobar. |
SimulateOnTranslateLanguageDetermined("fr", true); |
- EXPECT_EQ(0U, contents_wrapper()->infobar_count()); |
+ EXPECT_EQ(0U, contents_wrapper()->infobar_tab_helper()->infobar_count()); |
// Do the same steps but simulate closing the infobar this time. |
SimulateNavigation(GURL("http://www.youtube.fr"), "fr", true); |
EXPECT_TRUE(CloseTranslateInfoBar()); |
- EXPECT_EQ(0U, contents_wrapper()->infobar_count()); |
+ EXPECT_EQ(0U, contents_wrapper()->infobar_tab_helper()->infobar_count()); |
SimulateOnTranslateLanguageDetermined("fr", true); |
- EXPECT_EQ(0U, contents_wrapper()->infobar_count()); |
+ EXPECT_EQ(0U, contents_wrapper()->infobar_tab_helper()->infobar_count()); |
} |
// Test that reloading the page brings back the infobar. |