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

Side by Side Diff: chrome/browser/autofill/autofill_browsertest.cc

Issue 7006005: Move UrlFetcher to content. I originally thought that it's only used by chrome code, but turns o... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix linux Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "chrome/browser/autofill/autofill_common_test.h" 12 #include "chrome/browser/autofill/autofill_common_test.h"
13 #include "chrome/browser/autofill/autofill_profile.h" 13 #include "chrome/browser/autofill/autofill_profile.h"
14 #include "chrome/browser/autofill/personal_data_manager.h" 14 #include "chrome/browser/autofill/personal_data_manager.h"
15 #include "chrome/browser/net/predictor_api.h" 15 #include "chrome/browser/net/predictor_api.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/translate/translate_infobar_delegate.h" 17 #include "chrome/browser/translate/translate_infobar_delegate.h"
18 #include "chrome/browser/translate/translate_manager.h" 18 #include "chrome/browser/translate/translate_manager.h"
19 #include "chrome/browser/ui/browser.h" 19 #include "chrome/browser/ui/browser.h"
20 #include "chrome/browser/ui/browser_window.h" 20 #include "chrome/browser/ui/browser_window.h"
21 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 21 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
22 #include "chrome/common/net/test_url_fetcher_factory.h"
23 #include "chrome/common/render_messages.h" 22 #include "chrome/common/render_messages.h"
24 #include "chrome/renderer/translate_helper.h" 23 #include "chrome/renderer/translate_helper.h"
25 #include "chrome/test/in_process_browser_test.h" 24 #include "chrome/test/in_process_browser_test.h"
26 #include "chrome/test/ui_test_utils.h" 25 #include "chrome/test/ui_test_utils.h"
27 #include "content/browser/renderer_host/mock_render_process_host.h" 26 #include "content/browser/renderer_host/mock_render_process_host.h"
28 #include "content/browser/renderer_host/render_view_host.h" 27 #include "content/browser/renderer_host/render_view_host.h"
29 #include "content/browser/tab_contents/tab_contents.h" 28 #include "content/browser/tab_contents/tab_contents.h"
29 #include "content/common/test_url_fetcher_factory.h"
30 #include "testing/gtest/include/gtest/gtest.h" 30 #include "testing/gtest/include/gtest/gtest.h"
31 #include "ui/base/keycodes/keyboard_codes.h" 31 #include "ui/base/keycodes/keyboard_codes.h"
32 32
33 static const char* kDataURIPrefix = "data:text/html;charset=utf-8,"; 33 static const char* kDataURIPrefix = "data:text/html;charset=utf-8,";
34 static const char* kTestFormString = 34 static const char* kTestFormString =
35 "<form action=\"http://www.example.com/\" method=\"POST\">" 35 "<form action=\"http://www.example.com/\" method=\"POST\">"
36 "<label for=\"firstname\">First name:</label>" 36 "<label for=\"firstname\">First name:</label>"
37 " <input type=\"text\" id=\"firstname\"" 37 " <input type=\"text\" id=\"firstname\""
38 " onFocus=\"domAutomationController.send(true)\" /><br />" 38 " onFocus=\"domAutomationController.send(true)\" /><br />"
39 "<label for=\"lastname\">Last name:</label>" 39 "<label for=\"lastname\">Last name:</label>"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 // Once click the text field, it starts again. 476 // Once click the text field, it starts again.
477 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( 477 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
478 render_view_host(), L"", 478 render_view_host(), L"",
479 L"cr.googleTranslate.onTranslateElementLoad();")); 479 L"cr.googleTranslate.onTranslateElementLoad();"));
480 480
481 // Simulate the render notifying the translation has been done. 481 // Simulate the render notifying the translation has been done.
482 ui_test_utils::WaitForNotification(NotificationType::PAGE_TRANSLATED); 482 ui_test_utils::WaitForNotification(NotificationType::PAGE_TRANSLATED);
483 483
484 TryBasicFormFill(); 484 TryBasicFormFill();
485 } 485 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/search_provider_unittest.cc ('k') | chrome/browser/autofill/autofill_download.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698