| Index: third_party/WebKit/Source/core/html/forms/EmailInputTypeTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/forms/EmailInputTypeTest.cpp b/third_party/WebKit/Source/core/html/forms/EmailInputTypeTest.cpp
|
| index 15b18eb17f313562d338b0eb51e76783c479cd99..9a760f327387bc18365f07d6ddc6409610e91136 100644
|
| --- a/third_party/WebKit/Source/core/html/forms/EmailInputTypeTest.cpp
|
| +++ b/third_party/WebKit/Source/core/html/forms/EmailInputTypeTest.cpp
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "core/html/forms/EmailInputType.h"
|
|
|
| +#include "bindings/core/v8/ScriptRegexp.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| namespace blink {
|
| @@ -12,16 +13,18 @@ namespace {
|
|
|
| void expectToSucceed(const String& source)
|
| {
|
| - String result = EmailInputType::convertEmailAddressToASCII(source);
|
| + std::unique_ptr<ScriptRegexp> emailRegexp = EmailInputType::createEmailRegexp();
|
| + String result = EmailInputType::convertEmailAddressToASCII(*emailRegexp, source);
|
| EXPECT_NE(source, result);
|
| - EXPECT_TRUE(EmailInputType::isValidEmailAddress(result));
|
| + EXPECT_TRUE(EmailInputType::isValidEmailAddress(*emailRegexp, result));
|
| }
|
|
|
| void expectToFail(const String& source)
|
| {
|
| + std::unique_ptr<ScriptRegexp> emailRegexp = EmailInputType::createEmailRegexp();
|
| // Conversion failed. The resultant value might contains non-ASCII
|
| // characters, and not a valid email address.
|
| - EXPECT_FALSE(EmailInputType::isValidEmailAddress(EmailInputType::convertEmailAddressToASCII(source)));
|
| + EXPECT_FALSE(EmailInputType::isValidEmailAddress(*emailRegexp, EmailInputType::convertEmailAddressToASCII(*emailRegexp, source)));
|
| }
|
|
|
| } // namespace
|
|
|