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

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

Issue 6166010: net: Remove typedef net::URLRequestStatus URLRequestStatus; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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) 2010 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/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "app/keyboard_code_conversion.h" 8 #include "app/keyboard_code_conversion.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
11 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 102 }
103 103
104 virtual void SetUp() { 104 virtual void SetUp() {
105 URLFetcher::set_factory(&url_fetcher_factory_); 105 URLFetcher::set_factory(&url_fetcher_factory_);
106 InProcessBrowserTest::SetUp(); 106 InProcessBrowserTest::SetUp();
107 } 107 }
108 108
109 void SimulateURLFetch(bool success) { 109 void SimulateURLFetch(bool success) {
110 TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0); 110 TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0);
111 ASSERT_TRUE(fetcher); 111 ASSERT_TRUE(fetcher);
112 URLRequestStatus status; 112 net::URLRequestStatus status;
113 status.set_status(success ? URLRequestStatus::SUCCESS : 113 status.set_status(success ? net::URLRequestStatus::SUCCESS :
114 URLRequestStatus::FAILED); 114 net::URLRequestStatus::FAILED);
115 115
116 std::string script = " var google = {};" 116 std::string script = " var google = {};"
117 "google.translate = (function() {" 117 "google.translate = (function() {"
118 " return {" 118 " return {"
119 " TranslateService: function() {" 119 " TranslateService: function() {"
120 " return {" 120 " return {"
121 " isAvailable : function() {" 121 " isAvailable : function() {"
122 " return true;" 122 " return true;"
123 " }," 123 " },"
124 " restore : function() {" 124 " restore : function() {"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // But right now, the call stucks here. 277 // But right now, the call stucks here.
278 // Once click the text field, it starts again. 278 // Once click the text field, it starts again.
279 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( 279 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
280 rvh(), L"", L"cr.googleTranslate.onTranslateElementLoad();")); 280 rvh(), L"", L"cr.googleTranslate.onTranslateElementLoad();"));
281 281
282 // Simulate the render notifying the translation has been done. 282 // Simulate the render notifying the translation has been done.
283 ui_test_utils::WaitForNotification(NotificationType::PAGE_TRANSLATED); 283 ui_test_utils::WaitForNotification(NotificationType::PAGE_TRANSLATED);
284 284
285 TryBasicFormFillWithMKey(); 285 TryBasicFormFillWithMKey();
286 } 286 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/search_provider_unittest.cc ('k') | chrome/browser/autofill/autofill_download_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698