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

Side by Side Diff: components/spellcheck/renderer/spellcheck_unittest.cc

Issue 2610393002: [Sheriff] Disable SpellCheckTest.SpellCheckSuggestions_EN_US on WinDbg (Closed)
Patch Set: . Created 3 years, 11 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 | « no previous file | 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 (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 "components/spellcheck/renderer/spellcheck.h" 5 #include "components/spellcheck/renderer/spellcheck.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // non-English word; 171 // non-English word;
172 // * Tests for the function with an invalid English word with a following 172 // * Tests for the function with an invalid English word with a following
173 // space character; 173 // space character;
174 // * Tests for the function with an invalid English word with a following 174 // * Tests for the function with an invalid English word with a following
175 // non-English word, and; 175 // non-English word, and;
176 // * Tests for the function with two invalid English words concatenated 176 // * Tests for the function with two invalid English words concatenated
177 // with space characters or non-English words. 177 // with space characters or non-English words.
178 // A test with a "[ROBUSTNESS]" mark shows it is a robustness test and it uses 178 // A test with a "[ROBUSTNESS]" mark shows it is a robustness test and it uses
179 // grammatically incorrect string. 179 // grammatically incorrect string.
180 // TODO(groby): Please feel free to add more tests. 180 // TODO(groby): Please feel free to add more tests.
181 TEST_F(SpellCheckTest, SpellCheckStrings_EN_US) { 181 #if defined(OS_WIN) && !defined(NDEBUG)
182 // Test times out on win dbg. crbug.com/678753.
183 #define MAYBE_SpellCheckStrings_EN_US DISABLED_SpellCheckStrings_EN_US
184 #else
185 #define MAYBE_SpellCheckStrings_EN_US SpellCheckStrings_EN_US
186 #endif
187 TEST_F(SpellCheckTest, MAYBE_SpellCheckStrings_EN_US) {
182 static const struct { 188 static const struct {
183 // A string to be tested. 189 // A string to be tested.
184 const wchar_t* input; 190 const wchar_t* input;
185 // An expected result for this test case. 191 // An expected result for this test case.
186 // * true: the input string does not have any invalid words. 192 // * true: the input string does not have any invalid words.
187 // * false: the input string has one or more invalid words. 193 // * false: the input string has one or more invalid words.
188 bool expected_result; 194 bool expected_result;
189 // The position and the length of the first invalid word. 195 // The position and the length of the first invalid word.
190 int misspelling_start; 196 int misspelling_start;
191 int misspelling_length; 197 int misspelling_length;
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 // to be updated accordingly. 1570 // to be updated accordingly.
1565 ASSERT_EQ(5, spellcheck::kMaxSuggestions); 1571 ASSERT_EQ(5, spellcheck::kMaxSuggestions);
1566 FillSuggestions(suggestions_list, &suggestion_results); 1572 FillSuggestions(suggestions_list, &suggestion_results);
1567 ASSERT_EQ(5U, suggestion_results.size()); 1573 ASSERT_EQ(5U, suggestion_results.size());
1568 EXPECT_EQ(base::ASCIIToUTF16("0foo"), suggestion_results[0]); 1574 EXPECT_EQ(base::ASCIIToUTF16("0foo"), suggestion_results[0]);
1569 EXPECT_EQ(base::ASCIIToUTF16("1foo"), suggestion_results[1]); 1575 EXPECT_EQ(base::ASCIIToUTF16("1foo"), suggestion_results[1]);
1570 EXPECT_EQ(base::ASCIIToUTF16("2foo"), suggestion_results[2]); 1576 EXPECT_EQ(base::ASCIIToUTF16("2foo"), suggestion_results[2]);
1571 EXPECT_EQ(base::ASCIIToUTF16("0bar"), suggestion_results[3]); 1577 EXPECT_EQ(base::ASCIIToUTF16("0bar"), suggestion_results[3]);
1572 EXPECT_EQ(base::ASCIIToUTF16("1bar"), suggestion_results[4]); 1578 EXPECT_EQ(base::ASCIIToUTF16("1bar"), suggestion_results[4]);
1573 } 1579 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698