| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 } | 475 } |
| 476 | 476 |
| 477 virtual void TearDown() { | 477 virtual void TearDown() { |
| 478 notification_registrar_.Remove( | 478 notification_registrar_.Remove( |
| 479 this, | 479 this, |
| 480 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, | 480 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, |
| 481 content::Source<InfoBarService>(infobar_service())); | 481 content::Source<InfoBarService>(infobar_service())); |
| 482 | 482 |
| 483 ChromeRenderViewHostTestHarness::TearDown(); | 483 ChromeRenderViewHostTestHarness::TearDown(); |
| 484 TranslateService::ShutdownForTesting(); | 484 TranslateService::ShutdownForTesting(); |
| 485 translate::TranslateDownloadManager::GetInstance()->ResetForTesting(); |
| 485 } | 486 } |
| 486 | 487 |
| 487 void SetApplicationLocale(const std::string& locale) { | 488 void SetApplicationLocale(const std::string& locale) { |
| 488 g_browser_process->SetApplicationLocale(locale); | 489 g_browser_process->SetApplicationLocale(locale); |
| 489 translate::TranslateDownloadManager::GetInstance()->set_application_locale( | 490 translate::TranslateDownloadManager::GetInstance()->set_application_locale( |
| 490 g_browser_process->GetApplicationLocale()); | 491 g_browser_process->GetApplicationLocale()); |
| 491 } | 492 } |
| 492 | 493 |
| 493 void SimulateTranslateScriptURLFetch(bool success) { | 494 void SimulateTranslateScriptURLFetch(bool success) { |
| 494 net::TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID( | 495 net::TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID( |
| (...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1809 | 1810 |
| 1810 // Check the bubble exists instead of the infobar. | 1811 // Check the bubble exists instead of the infobar. |
| 1811 translate::TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); | 1812 translate::TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); |
| 1812 ASSERT_TRUE(infobar == NULL); | 1813 ASSERT_TRUE(infobar == NULL); |
| 1813 TranslateBubbleModel* bubble = factory->model(); | 1814 TranslateBubbleModel* bubble = factory->model(); |
| 1814 ASSERT_TRUE(bubble != NULL); | 1815 ASSERT_TRUE(bubble != NULL); |
| 1815 EXPECT_EQ(TranslateBubbleModel::VIEW_STATE_TRANSLATING, | 1816 EXPECT_EQ(TranslateBubbleModel::VIEW_STATE_TRANSLATING, |
| 1816 bubble->GetViewState()); | 1817 bubble->GetViewState()); |
| 1817 } | 1818 } |
| 1818 #endif // defined(USE_AURA) | 1819 #endif // defined(USE_AURA) |
| OLD | NEW |