| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // This entire test suite relies on the translate infobar which has been removed | 5 // This entire test suite relies on the translate infobar which has been removed |
| 6 // from Aura. The file should be ported to use the bubble. | 6 // from Aura. The file should be ported to use the bubble. |
| 7 #if !defined(USE_AURA) | 7 #if !defined(USE_AURA) |
| 8 | 8 |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "net/url_request/test_url_fetcher_factory.h" | 35 #include "net/url_request/test_url_fetcher_factory.h" |
| 36 #include "net/url_request/url_fetcher_delegate.h" | 36 #include "net/url_request/url_fetcher_delegate.h" |
| 37 | 37 |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 const base::FilePath::CharType kTranslateRoot[] = | 40 const base::FilePath::CharType kTranslateRoot[] = |
| 41 FILE_PATH_LITERAL("chrome/test/data/translate"); | 41 FILE_PATH_LITERAL("chrome/test/data/translate"); |
| 42 const char kFrenchTestPath[] = "/fr_test.html"; | 42 const char kFrenchTestPath[] = "/fr_test.html"; |
| 43 const char kBasicFrenchTestPath[] = "/basic_fr_test.html"; | 43 const char kBasicFrenchTestPath[] = "/basic_fr_test.html"; |
| 44 const char kRefreshMetaTagTestPath[] = "/refresh_meta_tag.html"; | 44 const char kRefreshMetaTagTestPath[] = "/refresh_meta_tag.html"; |
| 45 const char kRefreshMetaTagLongDelayTestPath[] = "/refresh_meta_tag_long.html"; |
| 45 const char kRefreshMetaTagCaseInsensitiveTestPath[] = | 46 const char kRefreshMetaTagCaseInsensitiveTestPath[] = |
| 46 "/refresh_meta_tag_casei.html"; | 47 "/refresh_meta_tag_casei.html"; |
| 47 const char kRefreshMetaTagAtOnloadTestPath[] = | 48 const char kRefreshMetaTagAtOnloadTestPath[] = |
| 48 "/refresh_meta_tag_at_onload.html"; | 49 "/refresh_meta_tag_at_onload.html"; |
| 49 const char kUpdateLocationTestPath[] = "/update_location.html"; | 50 const char kUpdateLocationTestPath[] = "/update_location.html"; |
| 50 const char kUpdateLocationAtOnloadTestPath[] = | 51 const char kUpdateLocationAtOnloadTestPath[] = |
| 51 "/update_location_at_onload.html"; | 52 "/update_location_at_onload.html"; |
| 52 const char kMainScriptPath[] = "/pseudo_main.js"; | 53 const char kMainScriptPath[] = "/pseudo_main.js"; |
| 53 const char kElementMainScriptPath[] = "/pseudo_element_main.js"; | 54 const char kElementMainScriptPath[] = "/pseudo_element_main.js"; |
| 54 | 55 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 | 268 |
| 268 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, BasicTranslation) { | 269 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, BasicTranslation) { |
| 269 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI(kBasicFrenchTestPath, true)); | 270 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI(kBasicFrenchTestPath, true)); |
| 270 } | 271 } |
| 271 | 272 |
| 272 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, IgnoreRefreshMetaTag) { | 273 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, IgnoreRefreshMetaTag) { |
| 273 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( | 274 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( |
| 274 kRefreshMetaTagTestPath, false)); | 275 kRefreshMetaTagTestPath, false)); |
| 275 } | 276 } |
| 276 | 277 |
| 278 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, TranslateRefreshMetaTagLongDelay) { |
| 279 ASSERT_NO_FATAL_FAILURE( |
| 280 CheckForTranslateUI(kRefreshMetaTagLongDelayTestPath, true)); |
| 281 } |
| 282 |
| 277 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, | 283 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, |
| 278 IgnoreRefreshMetaTagInCaseInsensitive) { | 284 IgnoreRefreshMetaTagInCaseInsensitive) { |
| 279 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( | 285 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( |
| 280 kRefreshMetaTagCaseInsensitiveTestPath, false)); | 286 kRefreshMetaTagCaseInsensitiveTestPath, false)); |
| 281 } | 287 } |
| 282 | 288 |
| 283 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, IgnoreRefreshMetaTagAtOnload) { | 289 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, IgnoreRefreshMetaTagAtOnload) { |
| 284 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( | 290 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( |
| 285 kRefreshMetaTagAtOnloadTestPath, false)); | 291 kRefreshMetaTagAtOnloadTestPath, false)); |
| 286 } | 292 } |
| 287 | 293 |
| 288 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, UpdateLocation) { | 294 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, UpdateLocation) { |
| 289 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( | 295 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( |
| 290 kUpdateLocationTestPath, false)); | 296 kUpdateLocationTestPath, false)); |
| 291 } | 297 } |
| 292 | 298 |
| 293 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, UpdateLocationAtOnload) { | 299 IN_PROC_BROWSER_TEST_F(TranslateBrowserTest, UpdateLocationAtOnload) { |
| 294 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( | 300 ASSERT_NO_FATAL_FAILURE(CheckForTranslateUI( |
| 295 kUpdateLocationAtOnloadTestPath, false)); | 301 kUpdateLocationAtOnloadTestPath, false)); |
| 296 } | 302 } |
| 297 #endif // !defined(USE_AURA) | 303 #endif // !defined(USE_AURA) |
| OLD | NEW |