| Index: ios/web/web_state/js/core_js_unittest.mm
|
| diff --git a/ios/web/web_state/js/core_js_unittest.mm b/ios/web/web_state/js/core_js_unittest.mm
|
| index 4d7623ffca5e5fb0b638f4c064180a3d7213ff4e..23009fe4a77c05ecd5c45e85bc9fa8ceacb5bc23 100644
|
| --- a/ios/web/web_state/js/core_js_unittest.mm
|
| +++ b/ios/web/web_state/js/core_js_unittest.mm
|
| @@ -9,7 +9,6 @@
|
|
|
| #include "base/macros.h"
|
| #include "base/strings/stringprintf.h"
|
| -#import "base/strings/sys_string_conversions.h"
|
| #import "ios/web/public/test/web_test_with_web_state.h"
|
| #import "ios/web/public/web_state/ui/crw_web_view_proxy.h"
|
| #import "ios/web/public/web_state/ui/crw_web_view_scroll_view_proxy.h"
|
| @@ -156,44 +155,6 @@ TEST_F(CoreJsTest, TextAreaStopsProximity) {
|
| }
|
| }
|
|
|
| -struct TestDataForPasswordFormDetection {
|
| - NSString* pageContent;
|
| - NSNumber* containsPassword;
|
| -};
|
| -
|
| -TEST_F(CoreJsTest, HasPasswordField) {
|
| - TestDataForPasswordFormDetection testData[] = {
|
| - // Form without a password field.
|
| - {@"<form><input type='text' name='password'></form>", @NO},
|
| - // Form with a password field.
|
| - {@"<form><input type='password' name='password'></form>", @YES}};
|
| - for (size_t i = 0; i < arraysize(testData); i++) {
|
| - TestDataForPasswordFormDetection& data = testData[i];
|
| - LoadHtml(data.pageContent);
|
| - id result = ExecuteJavaScript(@"__gCrWeb.hasPasswordField()");
|
| - EXPECT_NSEQ(data.containsPassword, result)
|
| - << " in test " << i << ": "
|
| - << base::SysNSStringToUTF8(data.pageContent);
|
| - }
|
| -}
|
| -
|
| -TEST_F(CoreJsTest, HasPasswordFieldinFrame) {
|
| - TestDataForPasswordFormDetection data = {
|
| - // Form with a password field in a nested iframe.
|
| - @"<iframe name='pf'></iframe>"
|
| - "<script>"
|
| - " var doc = frames['pf'].document.open();"
|
| - " doc.write('<form><input type=\\'password\\'></form>');"
|
| - " doc.close();"
|
| - "</script>",
|
| - @YES
|
| - };
|
| - LoadHtml(data.pageContent);
|
| - id result = ExecuteJavaScript(@"__gCrWeb.hasPasswordField()");
|
| - EXPECT_NSEQ(data.containsPassword, result)
|
| - << base::SysNSStringToUTF8(data.pageContent);
|
| -}
|
| -
|
| // Tests the javascript of the url of the an image present in the DOM.
|
| TEST_F(CoreJsTest, LinkOfImage) {
|
| // A page with a large image surrounded by a link.
|
|
|