summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjcivelli@google.com <jcivelli@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-02 20:04:49 +0000
committerjcivelli@google.com <jcivelli@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-02 20:04:49 +0000
commitd9b888cdf9ad654a3f2e5c22b935e68db77a71ef (patch)
tree84ffed720a70031d4db103f9d799ebd42f1f37ff /chrome
parent844c8edc70381ca48add0fb38d61db890a42f869 (diff)
downloadchromium_src-d9b888cdf9ad654a3f2e5c22b935e68db77a71ef.zip
chromium_src-d9b888cdf9ad654a3f2e5c22b935e68db77a71ef.tar.gz
chromium_src-d9b888cdf9ad654a3f2e5c22b935e68db77a71ef.tar.bz2
Chromium part of the autofill refactor: removing now unused code.
BUG=None TEST=All tests should pass. Autocomplete/autofill should still work. Review URL: http://codereview.chromium.org/4231001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64797 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/renderer/password_autocomplete_manager_unittest.cc30
-rw-r--r--chrome/renderer/render_view.cc18
-rw-r--r--chrome/renderer/render_view.h3
3 files changed, 6 insertions, 45 deletions
diff --git a/chrome/renderer/password_autocomplete_manager_unittest.cc b/chrome/renderer/password_autocomplete_manager_unittest.cc
index 8b1f451..2fc323f 100644
--- a/chrome/renderer/password_autocomplete_manager_unittest.cc
+++ b/chrome/renderer/password_autocomplete_manager_unittest.cc
@@ -152,26 +152,9 @@ class PasswordAutocompleteManagerTest : public RenderViewTest {
DISALLOW_COPY_AND_ASSIGN(PasswordAutocompleteManagerTest);
};
-#if defined(WEBKIT_BUG_41283_IS_FIXED)
-#define MAYBE_InitialAutocomplete InitialAutocomplete
-#define MAYBE_NoInitialAutocompleteForReadOnly NoInitialAutocompleteForReadOnly
-#define MAYBE_PasswordClearOnEdit PasswordClearOnEdit
-#define MAYBE_WaitUsername WaitUsername
-#define MAYBE_InlineAutocomplete InlineAutocomplete
-#define MAYBE_SuggestionSelect SuggestionSelect
-#else
-#define MAYBE_InitialAutocomplete DISABLED_InitialAutocomplete
-#define MAYBE_NoInitialAutocompleteForReadOnly \
- DISABLED_NoInitialAutocompleteForReadOnly
-#define MAYBE_PasswordClearOnEdit DISABLED_PasswordClearOnEdit
-#define MAYBE_WaitUsername DISABLED_WaitUsername
-#define MAYBE_InlineAutocomplete DISABLED_InlineAutocomplete
-#define MAYBE_SuggestionSelect DISABLED_SuggestionSelect
-#endif
-
// Tests that the password login is autocompleted as expected when the browser
// sends back the password info.
-TEST_F(PasswordAutocompleteManagerTest, MAYBE_InitialAutocomplete) {
+TEST_F(PasswordAutocompleteManagerTest, InitialAutocomplete) {
/*
* Right now we are not sending the message to the browser because we are
* loading a data URL and the security origin canAccessPasswordManager()
@@ -203,8 +186,7 @@ TEST_F(PasswordAutocompleteManagerTest, MAYBE_InitialAutocomplete) {
}
// Tests that changing the username does not fill a read-only password field.
-TEST_F(PasswordAutocompleteManagerTest,
- MAYBE_NoInitialAutocompleteForReadOnly) {
+TEST_F(PasswordAutocompleteManagerTest, NoInitialAutocompleteForReadOnly) {
password_element_.setAttribute(WebString::fromUTF8("readonly"),
WebString::fromUTF8("true"));
@@ -218,7 +200,7 @@ TEST_F(PasswordAutocompleteManagerTest,
}
// Tests that editing the password clears the autocompleted password field.
-TEST_F(PasswordAutocompleteManagerTest, MAYBE_PasswordClearOnEdit) {
+TEST_F(PasswordAutocompleteManagerTest, PasswordClearOnEdit) {
// Simulate the browser sending back the login info, it triggers the
// autocomplete.
SimulateOnFillPasswordForm(fill_data_);
@@ -232,7 +214,7 @@ TEST_F(PasswordAutocompleteManagerTest, MAYBE_PasswordClearOnEdit) {
// Tests that we only autocomplete on focus lost and with a full username match
// when |wait_for_username| is true.
-TEST_F(PasswordAutocompleteManagerTest, MAYBE_WaitUsername) {
+TEST_F(PasswordAutocompleteManagerTest, WaitUsername) {
// Simulate the browser sending back the login info.
fill_data_.wait_for_username = true;
SimulateOnFillPasswordForm(fill_data_);
@@ -265,7 +247,7 @@ TEST_F(PasswordAutocompleteManagerTest, MAYBE_WaitUsername) {
}
// Tests that inline autocompletion works properly.
-TEST_F(PasswordAutocompleteManagerTest, MAYBE_InlineAutocomplete) {
+TEST_F(PasswordAutocompleteManagerTest, InlineAutocomplete) {
// Simulate the browser sending back the login info.
SimulateOnFillPasswordForm(fill_data_);
@@ -311,7 +293,7 @@ TEST_F(PasswordAutocompleteManagerTest, MAYBE_InlineAutocomplete) {
}
// Tests that selecting and item in the suggestion drop-down works.
-TEST_F(PasswordAutocompleteManagerTest, MAYBE_SuggestionSelect) {
+TEST_F(PasswordAutocompleteManagerTest, SuggestionSelect) {
// Simulate the browser sending back the login info.
SimulateOnFillPasswordForm(fill_data_);
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 8cd10be..471c2a5 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -2025,13 +2025,10 @@ void RenderView::didExecuteCommand(const WebString& command_name) {
void RenderView::textFieldDidEndEditing(
const WebKit::WebInputElement& element) {
-#if defined(WEBKIT_BUG_41283_IS_FIXED)
password_autocomplete_manager_->TextFieldDidEndEditing(element);
-#endif
}
void RenderView::textFieldDidChange(const WebKit::WebInputElement& element) {
-#if defined(WEBKIT_BUG_41283_IS_FIXED)
// We post a task for doing the AutoFill as the caret position is not set
// properly at this point (http://bugs.webkit.org/show_bug.cgi?id=16976) and
// it is needed to trigger autofill.
@@ -2040,7 +2037,6 @@ void RenderView::textFieldDidChange(const WebKit::WebInputElement& element) {
FROM_HERE,
autofill_method_factory_.NewRunnableMethod(
&RenderView::TextFieldDidChangeImpl, element));
-#endif
}
void RenderView::TextFieldDidChangeImpl(
@@ -2079,9 +2075,7 @@ void RenderView::SendPendingAccessibilityNotifications() {
void RenderView::textFieldDidReceiveKeyDown(
const WebKit::WebInputElement& element,
const WebKit::WebKeyboardEvent& event) {
-#if defined(WEBKIT_BUG_41283_IS_FIXED)
password_autocomplete_manager_->TextFieldHandlingKeyDown(element, event);
-#endif
}
bool RenderView::handleCurrentKeyboardEvent() {
@@ -2375,12 +2369,6 @@ void RenderView::didUpdateInspectorSetting(const WebString& key,
value.utf8()));
}
-void RenderView::queryAutofillSuggestions(const WebNode& node,
- const WebString& name,
- const WebString& value) {
- autofill_helper_->QueryAutoFillSuggestions(node);
-}
-
void RenderView::removeAutofillSuggestions(const WebString& name,
const WebString& value) {
autofill_helper_->RemoveAutocompleteSuggestion(name, value);
@@ -2407,12 +2395,10 @@ void RenderView::didClearAutoFillSelection(const WebKit::WebNode& node) {
void RenderView::didAcceptAutocompleteSuggestion(
const WebKit::WebInputElement& user_element) {
-#if defined(WEBKIT_BUG_41283_IS_FIXED)
bool result = password_autocomplete_manager_->FillPassword(user_element);
// Since this user name was selected from a suggestion list, we should always
// have password for it.
DCHECK(result);
-#endif
}
// WebKit::WebWidgetClient ----------------------------------------------------
@@ -4456,12 +4442,8 @@ void RenderView::OnDragSourceSystemDragEnded() {
void RenderView::OnFillPasswordForm(
const webkit_glue::PasswordFormFillData& form_data) {
-#if defined(WEBKIT_BUG_41283_IS_FIXED)
password_autocomplete_manager_->ReceivedPasswordFormFillData(webview(),
form_data);
-#else
- webkit_glue::FillPasswordForm(this->webview(), form_data);
-#endif
}
void RenderView::OnDragTargetDragEnter(const WebDropData& drop_data,
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index a39aa63..1d23987 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -434,9 +434,6 @@ class RenderView : public RenderWidget,
WebKit::WebAccessibilityNotification notification);
virtual void didUpdateInspectorSetting(const WebKit::WebString& key,
const WebKit::WebString& value);
- virtual void queryAutofillSuggestions(const WebKit::WebNode& node,
- const WebKit::WebString& name,
- const WebKit::WebString& value);
virtual void removeAutofillSuggestions(const WebKit::WebString& name,
const WebKit::WebString& value);
virtual void didAcceptAutoFillSuggestion(const WebKit::WebNode& node,