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

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

Issue 10073014: Add more functionality to WebView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/browser_focus_uitest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 fetcher->set_response_code(success ? 200 : 500); 183 fetcher->set_response_code(success ? 200 : 500);
184 fetcher->SetResponseString(script); 184 fetcher->SetResponseString(script);
185 fetcher->delegate()->OnURLFetchComplete(fetcher); 185 fetcher->delegate()->OnURLFetchComplete(fetcher);
186 } 186 }
187 187
188 void FocusFirstNameField() { 188 void FocusFirstNameField() {
189 LOG(WARNING) << "Clicking on the tab."; 189 LOG(WARNING) << "Clicking on the tab.";
190 ASSERT_NO_FATAL_FAILURE(ui_test_utils::ClickOnView(browser(), 190 ASSERT_NO_FATAL_FAILURE(ui_test_utils::ClickOnView(browser(),
191 VIEW_ID_TAB_CONTAINER)); 191 VIEW_ID_TAB_CONTAINER));
192 ASSERT_TRUE(ui_test_utils::IsViewFocused(browser(), 192 ASSERT_TRUE(ui_test_utils::IsViewFocused(browser(),
193 VIEW_ID_TAB_CONTAINER_FOCUS_VIEW)); 193 VIEW_ID_TAB_CONTAINER));
194 194
195 LOG(WARNING) << "Focusing the first name field."; 195 LOG(WARNING) << "Focusing the first name field.";
196 bool result = false; 196 bool result = false;
197 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( 197 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
198 render_view_host(), L"", 198 render_view_host(), L"",
199 L"if (document.readyState === 'complete')" 199 L"if (document.readyState === 'complete')"
200 L" document.getElementById('firstname').focus();" 200 L" document.getElementById('firstname').focus();"
201 L"else" 201 L"else"
202 L" domAutomationController.send(false);", 202 L" domAutomationController.send(false);",
203 &result)); 203 &result));
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 // Once click the text field, it starts again. 719 // Once click the text field, it starts again.
720 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( 720 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
721 render_view_host(), L"", 721 render_view_host(), L"",
722 L"cr.googleTranslate.onTranslateElementLoad();")); 722 L"cr.googleTranslate.onTranslateElementLoad();"));
723 723
724 // Simulate the render notifying the translation has been done. 724 // Simulate the render notifying the translation has been done.
725 translation_observer.Wait(); 725 translation_observer.Wait();
726 726
727 TryBasicFormFill(); 727 TryBasicFormFill();
728 } 728 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_focus_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698