Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |