Chromium Code Reviews| Index: chrome/browser/translate/translate_browsertest.cc |
| diff --git a/chrome/browser/translate/translate_browsertest.cc b/chrome/browser/translate/translate_browsertest.cc |
| index 0f2c02bf3af0f96f90a6f39695c27a75bdbf722d..3366c7934f800d1b38a05f81b298e8b1b4f99710 100644 |
| --- a/chrome/browser/translate/translate_browsertest.cc |
| +++ b/chrome/browser/translate/translate_browsertest.cc |
| @@ -54,10 +54,6 @@ class TranslateBrowserTest : public InProcessBrowserTest { |
| base::FilePath(kTranslateRoot)), |
| infobar_service_(NULL) {} |
| - virtual void SetUpOnMainThread() OVERRIDE { |
| - TranslateService::SetUseInfobar(true); |
| - } |
| - |
| virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| ASSERT_TRUE(https_server_.Start()); |
| // Setup alternate security origin for testing in order to allow XHR against |
| @@ -127,11 +123,9 @@ class TranslateBrowserTest : public InProcessBrowserTest { |
| }; |
| IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, TranslateInIsolatedWorld) { |
| -#if defined(OS_WIN) && defined(USE_ASH) |
| - // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
| - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
| + // This test only applies to the infobar translate UX, not the new bubble UX. |
|
Takashi Toyoshima
2014/06/11 04:54:32
IIUC, with this change, these tests are changed to
msw
2014/06/11 07:31:20
I filed Issue 383235 and added TODOs. Most of thes
|
| + if (TranslateService::IsTranslateBubbleEnabled()) |
| return; |
| -#endif |
| net::TestURLFetcherFactory factory; |
| ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| @@ -196,11 +190,9 @@ IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, TranslateInIsolatedWorld) { |
| } |
| IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, IgnoreRefreshMetaTag) { |
| -#if defined(OS_WIN) && defined(USE_ASH) |
| - // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
| - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
| + // This test only applies to the infobar translate UX, not the new bubble UX. |
| + if (TranslateService::IsTranslateBubbleEnabled()) |
| return; |
| -#endif |
| ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| @@ -231,11 +223,9 @@ IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, IgnoreRefreshMetaTag) { |
| IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, |
| IgnoreRefreshMetaTagInCaseInsensitive) { |
| -#if defined(OS_WIN) && defined(USE_ASH) |
| - // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
| - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
| + // This test only applies to the infobar translate UX, not the new bubble UX. |
| + if (TranslateService::IsTranslateBubbleEnabled()) |
| return; |
| -#endif |
| ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| @@ -265,11 +255,9 @@ IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, |
| } |
| IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, IgnoreRefreshMetaTagAtOnload) { |
| -#if defined(OS_WIN) && defined(USE_ASH) |
| - // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
| - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
| + // This test only applies to the infobar translate UX, not the new bubble UX. |
| + if (TranslateService::IsTranslateBubbleEnabled()) |
| return; |
| -#endif |
| ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| @@ -299,11 +287,9 @@ IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, IgnoreRefreshMetaTagAtOnload) { |
| } |
| IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, UpdateLocation) { |
| -#if defined(OS_WIN) && defined(USE_ASH) |
| - // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
| - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
| + // This test only applies to the infobar translate UX, not the new bubble UX. |
| + if (TranslateService::IsTranslateBubbleEnabled()) |
| return; |
| -#endif |
| ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| @@ -333,11 +319,9 @@ IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, UpdateLocation) { |
| } |
| IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, UpdateLocationAtOnload) { |
| -#if defined(OS_WIN) && defined(USE_ASH) |
| - // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
| - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
| + // This test only applies to the infobar translate UX, not the new bubble UX. |
| + if (TranslateService::IsTranslateBubbleEnabled()) |
| return; |
| -#endif |
| ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |