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

Side by Side Diff: content/test/test_blink_web_unit_test_support.cc

Issue 630793002: Add ValidationTooShort localized sring, in preparation for a message displayed when a form input co… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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 unified diff | Download patch
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/test/test_blink_web_unit_test_support.h" 5 #include "content/test/test_blink_web_unit_test_support.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 return base::ASCIIToUTF16("$1 selected"); 204 return base::ASCIIToUTF16("$1 selected");
205 return BlinkPlatformImpl::queryLocalizedString(name, value); 205 return BlinkPlatformImpl::queryLocalizedString(name, value);
206 } 206 }
207 207
208 blink::WebString TestBlinkWebUnitTestSupport::queryLocalizedString( 208 blink::WebString TestBlinkWebUnitTestSupport::queryLocalizedString(
209 blink::WebLocalizedString::Name name, 209 blink::WebLocalizedString::Name name,
210 const blink::WebString& value1, 210 const blink::WebString& value1,
211 const blink::WebString& value2) { 211 const blink::WebString& value2) {
212 if (name == blink::WebLocalizedString::ValidationTooLong) 212 if (name == blink::WebLocalizedString::ValidationTooLong)
213 return base::ASCIIToUTF16("too long"); 213 return base::ASCIIToUTF16("too long");
214 if (name == blink::WebLocalizedString::ValidationTooShort)
215 return base::ASCIIToUTF16("too short");
tkent 2014/10/07 01:37:17 I don't think this change is necessary. This func
Bartek Nowierski 2014/10/08 08:38:48 Done.
214 if (name == blink::WebLocalizedString::ValidationStepMismatch) 216 if (name == blink::WebLocalizedString::ValidationStepMismatch)
215 return base::ASCIIToUTF16("step mismatch"); 217 return base::ASCIIToUTF16("step mismatch");
216 return BlinkPlatformImpl::queryLocalizedString(name, value1, value2); 218 return BlinkPlatformImpl::queryLocalizedString(name, value1, value2);
217 } 219 }
218 220
219 blink::WebString TestBlinkWebUnitTestSupport::defaultLocale() { 221 blink::WebString TestBlinkWebUnitTestSupport::defaultLocale() {
220 return base::ASCIIToUTF16("en-US"); 222 return base::ASCIIToUTF16("en-US");
221 } 223 }
222 224
223 #if defined(OS_WIN) || defined(OS_MACOSX) 225 #if defined(OS_WIN) || defined(OS_MACOSX)
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 const blink::WebString& path) { 300 const blink::WebString& path) {
299 base::FilePath file_path = base::FilePath::FromUTF16Unsafe(path); 301 base::FilePath file_path = base::FilePath::FromUTF16Unsafe(path);
300 302
301 std::string buffer; 303 std::string buffer;
302 base::ReadFileToString(file_path, &buffer); 304 base::ReadFileToString(file_path, &buffer);
303 305
304 return blink::WebData(buffer.data(), buffer.size()); 306 return blink::WebData(buffer.data(), buffer.size());
305 } 307 }
306 308
307 } // namespace content 309 } // namespace content
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698