Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: chrome/browser/translate/translate_browsertest.cc

Issue 1774663002: Teach CRFO:CapturePageText to recognize page refreshes with long delays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nits. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/renderer/chrome_render_frame_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/chrome_render_frame_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698