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

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

Issue 8373021: Convert URLFetcher::Delegates to use an interface in content/public/common. Also remove the old U... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync and remove unncessary forward declares Created 9 years, 1 month 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"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 " document.getElementsByTagName(\"body\")[0].innerHTML = '" + 128 " document.getElementsByTagName(\"body\")[0].innerHTML = '" +
129 std::string(kTestFormString) + 129 std::string(kTestFormString) +
130 " ';" 130 " ';"
131 " onTranslateProgress(100, true, false);" 131 " onTranslateProgress(100, true, false);"
132 " }" 132 " }"
133 " };" 133 " };"
134 " }" 134 " }"
135 " };" 135 " };"
136 "})();"; 136 "})();";
137 137
138 fetcher->delegate()->OnURLFetchComplete(fetcher, 138 fetcher->set_url(fetcher->original_url());
139 fetcher->original_url(), 139 fetcher->set_status(status);
140 status, success ? 200 : 500, 140 fetcher->set_response_code(success ? 200 : 500);
141 net::ResponseCookies(), 141 fetcher->SetResponseString(script);
142 script); 142 fetcher->delegate()->OnURLFetchComplete(fetcher);
143 } 143 }
144 144
145 void FocusFirstNameField() { 145 void FocusFirstNameField() {
146 LOG(WARNING) << "Clicking on the tab."; 146 LOG(WARNING) << "Clicking on the tab.";
147 ASSERT_NO_FATAL_FAILURE(ui_test_utils::ClickOnView(browser(), 147 ASSERT_NO_FATAL_FAILURE(ui_test_utils::ClickOnView(browser(),
148 VIEW_ID_TAB_CONTAINER)); 148 VIEW_ID_TAB_CONTAINER));
149 ASSERT_TRUE(ui_test_utils::IsViewFocused(browser(), 149 ASSERT_TRUE(ui_test_utils::IsViewFocused(browser(),
150 VIEW_ID_TAB_CONTAINER_FOCUS_VIEW)); 150 VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
151 151
152 LOG(WARNING) << "Focusing the first name field."; 152 LOG(WARNING) << "Focusing the first name field.";
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 // Once click the text field, it starts again. 675 // Once click the text field, it starts again.
676 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( 676 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
677 render_view_host(), L"", 677 render_view_host(), L"",
678 L"cr.googleTranslate.onTranslateElementLoad();")); 678 L"cr.googleTranslate.onTranslateElementLoad();"));
679 679
680 // Simulate the render notifying the translation has been done. 680 // Simulate the render notifying the translation has been done.
681 translation_observer.Wait(); 681 translation_observer.Wait();
682 682
683 TryBasicFormFill(); 683 TryBasicFormFill();
684 } 684 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698