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

Unified Diff: webkit/tools/test_shell/test_shell_webkit_init.cc

Issue 4678006: Add form validation message strings.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/test_shell_webkit_init.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell_webkit_init.cc
===================================================================
--- webkit/tools/test_shell/test_shell_webkit_init.cc (revision 66920)
+++ webkit/tools/test_shell/test_shell_webkit_init.cc (working copy)
@@ -119,3 +119,54 @@
}
return webkit_glue::WebKitClientImpl::loadResource(name);
}
+
+WebKit::WebString TestShellWebKitInit::queryLocalizedString(
+ WebKit::WebLocalizedString::Name name) {
+ switch (name) {
+ case WebKit::WebLocalizedString::ValidationValueMissing:
+ case WebKit::WebLocalizedString::ValidationValueMissingForCheckbox:
+ case WebKit::WebLocalizedString::ValidationValueMissingForFile:
+ case WebKit::WebLocalizedString::ValidationValueMissingForMultipleFile:
+ case WebKit::WebLocalizedString::ValidationValueMissingForRadio:
+ case WebKit::WebLocalizedString::ValidationValueMissingForSelect:
+ return ASCIIToUTF16("value missing");
+ case WebKit::WebLocalizedString::ValidationTypeMismatch:
+ case WebKit::WebLocalizedString::ValidationTypeMismatchForEmail:
+ case WebKit::WebLocalizedString::ValidationTypeMismatchForMultipleEmail:
+ case WebKit::WebLocalizedString::ValidationTypeMismatchForURL:
+ return ASCIIToUTF16("type mismatch");
+ case WebKit::WebLocalizedString::ValidationPatternMismatch:
+ return ASCIIToUTF16("pattern mismatch");
+ case WebKit::WebLocalizedString::ValidationTooLong:
+ return ASCIIToUTF16("too long");
+ case WebKit::WebLocalizedString::ValidationRangeUnderflow:
+ return ASCIIToUTF16("range underflow");
+ case WebKit::WebLocalizedString::ValidationRangeOverflow:
+ return ASCIIToUTF16("range overflow");
+ case WebKit::WebLocalizedString::ValidationStepMismatch:
+ return ASCIIToUTF16("step mismatch");
+ default:
+ return WebKitClientImpl::queryLocalizedString(name);
+ }
+}
+
+WebKit::WebString TestShellWebKitInit::queryLocalizedString(
+ WebKit::WebLocalizedString::Name name, const WebKit::WebString& value) {
+ if (name == WebKit::WebLocalizedString::ValidationRangeUnderflow)
+ return ASCIIToUTF16("range underflow");
+ if (name == WebKit::WebLocalizedString::ValidationRangeOverflow)
+ return ASCIIToUTF16("range overflow");
+ return WebKitClientImpl::queryLocalizedString(name, value);
+}
+
+WebKit::WebString TestShellWebKitInit::queryLocalizedString(
+ WebKit::WebLocalizedString::Name name,
+ const WebKit::WebString& value1,
+ const WebKit::WebString& value2) {
+ if (name == WebKit::WebLocalizedString::ValidationTooLong)
+ return ASCIIToUTF16("too long");
+ if (name == WebKit::WebLocalizedString::ValidationStepMismatch)
+ return ASCIIToUTF16("step mismatch");
+ return WebKitClientImpl::queryLocalizedString(name, value1, value2);
+}
+
« no previous file with comments | « webkit/tools/test_shell/test_shell_webkit_init.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698