summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-07 18:31:38 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-07 18:31:38 +0000
commit06f671d8de053dfd09a791f22865369f5daf092a (patch)
tree035f5311c4a9ad43b57b55ae8f8fc6c55b8fb7ea /chrome/renderer
parent831d29c2dfd23457aa54b9a4f73f030827500a65 (diff)
downloadchromium_src-06f671d8de053dfd09a791f22865369f5daf092a.zip
chromium_src-06f671d8de053dfd09a791f22865369f5daf092a.tar.gz
chromium_src-06f671d8de053dfd09a791f22865369f5daf092a.tar.bz2
Switch over to non-deprecated methods.
R=jhawkins BUG=none TEST=none Review URL: http://codereview.chromium.org/1985008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46718 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/form_autocomplete_browsertest.cc2
-rw-r--r--chrome/renderer/form_manager_unittest.cc40
2 files changed, 17 insertions, 25 deletions
diff --git a/chrome/renderer/form_autocomplete_browsertest.cc b/chrome/renderer/form_autocomplete_browsertest.cc
index d0a591e..1cee75e 100644
--- a/chrome/renderer/form_autocomplete_browsertest.cc
+++ b/chrome/renderer/form_autocomplete_browsertest.cc
@@ -102,7 +102,7 @@ TEST_F(FormAutocompleteTest, DISABLED_DynamicAutoCompleteOffFormSubmit) {
WebKit::WebElement element =
GetMainFrame()->document().getElementById(WebKit::WebString("myForm"));
ASSERT_FALSE(element.isNull());
- WebKit::WebFormElement form = element.toElement<WebKit::WebFormElement>();
+ WebKit::WebFormElement form = element.to<WebKit::WebFormElement>();
EXPECT_TRUE(form.autoComplete());
// Dynamically mark the form as autocomplete off.
diff --git a/chrome/renderer/form_manager_unittest.cc b/chrome/renderer/form_manager_unittest.cc
index f546909..6c6a809 100644
--- a/chrome/renderer/form_manager_unittest.cc
+++ b/chrome/renderer/form_manager_unittest.cc
@@ -286,9 +286,8 @@ TEST_F(FormManagerTest, FindForm) {
ASSERT_EQ(1U, forms.size());
// Get the input element we want to find.
- WebElement element =
- web_frame->document().getElementById(WebString::fromUTF8("firstname"));
- WebInputElement input_element = element.toElement<WebInputElement>();
+ WebElement element = web_frame->document().getElementById("firstname");
+ WebInputElement input_element = element.to<WebInputElement>();
// Find the form and verify it's the correct form.
FormData form;
@@ -336,9 +335,8 @@ TEST_F(FormManagerTest, FillForm) {
ASSERT_EQ(1U, forms.size());
// Get the input element we want to find.
- WebElement element =
- web_frame->document().getElementById(WebString::fromUTF8("firstname"));
- WebInputElement input_element = element.toElement<WebInputElement>();
+ WebElement element = web_frame->document().getElementById("firstname");
+ WebInputElement input_element = element.to<WebInputElement>();
// Find the form that contains the input element.
FormData form;
@@ -806,9 +804,8 @@ TEST_F(FormManagerTest, FillFormMaxLength) {
ASSERT_EQ(1U, forms.size());
// Get the input element we want to find.
- WebElement element =
- web_frame->document().getElementById(WebString::fromUTF8("firstname"));
- WebInputElement input_element = element.toElement<WebInputElement>();
+ WebElement element = web_frame->document().getElementById("firstname");
+ WebInputElement input_element = element.to<WebInputElement>();
// Find the form that contains the input element.
FormData form;
@@ -893,9 +890,8 @@ TEST_F(FormManagerTest, FillFormNegativeMaxLength) {
ASSERT_EQ(1U, forms.size());
// Get the input element we want to find.
- WebElement element =
- web_frame->document().getElementById(WebString::fromUTF8("firstname"));
- WebInputElement input_element = element.toElement<WebInputElement>();
+ WebElement element = web_frame->document().getElementById("firstname");
+ WebInputElement input_element = element.to<WebInputElement>();
// Find the form that contains the input element.
FormData form;
@@ -1026,9 +1022,8 @@ TEST_F(FormManagerTest, FillFormMoreFormDataFields) {
EXPECT_TRUE(form_manager.FillForm(*form));
// Get the input element we want to find.
- WebElement element =
- web_frame->document().getElementById(WebString::fromUTF8("firstname"));
- WebInputElement input_element = element.toElement<WebInputElement>();
+ WebElement element = web_frame->document().getElementById("firstname");
+ WebInputElement input_element = element.to<WebInputElement>();
// Find the newly-filled form that contains the input element.
FormData form2;
@@ -1110,9 +1105,8 @@ TEST_F(FormManagerTest, FillFormFewerFormDataFields) {
EXPECT_TRUE(form_manager.FillForm(*form));
// Get the input element we want to find.
- WebElement element =
- web_frame->document().getElementById(WebString::fromUTF8("firstname"));
- WebInputElement input_element = element.toElement<WebInputElement>();
+ WebElement element = web_frame->document().getElementById("firstname");
+ WebInputElement input_element = element.to<WebInputElement>();
// Find the newly-filled form that contains the input element.
FormData form2;
@@ -1278,9 +1272,8 @@ TEST_F(FormManagerTest, FillFormEmptyName) {
ASSERT_EQ(1U, forms.size());
// Get the input element we want to find.
- WebElement element =
- web_frame->document().getElementById(WebString::fromUTF8("firstname"));
- WebInputElement input_element = element.toElement<WebInputElement>();
+ WebElement element = web_frame->document().getElementById("firstname");
+ WebInputElement input_element = element.to<WebInputElement>();
// Find the form that contains the input element.
FormData form;
@@ -1365,9 +1358,8 @@ TEST_F(FormManagerTest, FillFormEmptyFormNames) {
ASSERT_EQ(2U, forms.size());
// Get the input element we want to find.
- WebElement element =
- web_frame->document().getElementById(WebString::fromUTF8("apple"));
- WebInputElement input_element = element.toElement<WebInputElement>();
+ WebElement element = web_frame->document().getElementById("apple");
+ WebInputElement input_element = element.to<WebInputElement>();
// Find the form that contains the input element.
FormData form;