OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/glue/webkit_glue.h" | 5 #include "webkit/glue/webkit_glue.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // * Tests for the function with an invalid English word with a preceding | 138 // * Tests for the function with an invalid English word with a preceding |
139 // non-English word; | 139 // non-English word; |
140 // * Tests for the function with an invalid English word with a following | 140 // * Tests for the function with an invalid English word with a following |
141 // space character; | 141 // space character; |
142 // * Tests for the function with an invalid English word with a following | 142 // * Tests for the function with an invalid English word with a following |
143 // non-English word, and; | 143 // non-English word, and; |
144 // * Tests for the function with two invalid English words concatenated | 144 // * Tests for the function with two invalid English words concatenated |
145 // with space characters or non-English words. | 145 // with space characters or non-English words. |
146 // A test with a "[ROBUSTNESS]" mark shows it is a robustness test and it uses | 146 // A test with a "[ROBUSTNESS]" mark shows it is a robustness test and it uses |
147 // grammatically incorrect string. | 147 // grammatically incorrect string. |
148 // TODO(hbono): Please feel free to add more tests. | 148 // TODO(groby): Please feel free to add more tests. |
149 TEST_F(SpellCheckTest, SpellCheckStrings_EN_US) { | 149 TEST_F(SpellCheckTest, SpellCheckStrings_EN_US) { |
150 static const struct { | 150 static const struct { |
151 // A string to be tested. | 151 // A string to be tested. |
152 const wchar_t* input; | 152 const wchar_t* input; |
153 // An expected result for this test case. | 153 // An expected result for this test case. |
154 // * true: the input string does not have any invalid words. | 154 // * true: the input string does not have any invalid words. |
155 // * false: the input string has one or more invalid words. | 155 // * false: the input string has one or more invalid words. |
156 bool expected_result; | 156 bool expected_result; |
157 // The position and the length of the first invalid word. | 157 // The position and the length of the first invalid word. |
158 int misspelling_start; | 158 int misspelling_start; |
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 | 1269 |
1270 FilePath hunspell = GetHunspellDirectory(); | 1270 FilePath hunspell = GetHunspellDirectory(); |
1271 for (size_t i = 0; i < spellcheck_languages.size(); ++i) { | 1271 for (size_t i = 0; i < spellcheck_languages.size(); ++i) { |
1272 FilePath dict = chrome::spellcheck_common::GetVersionedFileName( | 1272 FilePath dict = chrome::spellcheck_common::GetVersionedFileName( |
1273 spellcheck_languages[i], hunspell); | 1273 spellcheck_languages[i], hunspell); |
1274 EXPECT_TRUE(file_util::PathExists(dict)) << dict.value() << " not found"; | 1274 EXPECT_TRUE(file_util::PathExists(dict)) << dict.value() << " not found"; |
1275 } | 1275 } |
1276 } | 1276 } |
1277 | 1277 |
1278 #endif | 1278 #endif |
OLD | NEW |