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 "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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 break; | 482 break; |
483 } | 483 } |
484 } | 484 } |
485 | 485 |
486 EXPECT_TRUE(suggested_word_is_present); | 486 EXPECT_TRUE(suggested_word_is_present); |
487 } | 487 } |
488 } | 488 } |
489 | 489 |
490 // This test verifies our spellchecker can split a text into words and check | 490 // This test verifies our spellchecker can split a text into words and check |
491 // the spelling of each word in the text. | 491 // the spelling of each word in the text. |
492 #if defined(THREAD_SANITIZER) | 492 #if defined(THREAD_SANITIZER) || defined(OS_WIN) |
493 // SpellCheckTest.SpellCheckText fails under ThreadSanitizer v2. | 493 // SpellCheckTest.SpellCheckText fails under ThreadSanitizer v2. |
494 // See http://crbug.com/217909. | 494 // See http://crbug.com/217909. |
| 495 // Also fails on windows: crbug.com/678300. |
495 #define MAYBE_SpellCheckText DISABLED_SpellCheckText | 496 #define MAYBE_SpellCheckText DISABLED_SpellCheckText |
496 #else | 497 #else |
497 #define MAYBE_SpellCheckText SpellCheckText | 498 #define MAYBE_SpellCheckText SpellCheckText |
498 #endif // THREAD_SANITIZER | 499 #endif // THREAD_SANITIZER |
499 TEST_F(SpellCheckTest, MAYBE_SpellCheckText) { | 500 TEST_F(SpellCheckTest, MAYBE_SpellCheckText) { |
500 static const struct { | 501 static const struct { |
501 const char* language; | 502 const char* language; |
502 const wchar_t* input; | 503 const wchar_t* input; |
503 } kTestCases[] = { | 504 } kTestCases[] = { |
504 { | 505 { |
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1563 // to be updated accordingly. | 1564 // to be updated accordingly. |
1564 ASSERT_EQ(5, spellcheck::kMaxSuggestions); | 1565 ASSERT_EQ(5, spellcheck::kMaxSuggestions); |
1565 FillSuggestions(suggestions_list, &suggestion_results); | 1566 FillSuggestions(suggestions_list, &suggestion_results); |
1566 ASSERT_EQ(5U, suggestion_results.size()); | 1567 ASSERT_EQ(5U, suggestion_results.size()); |
1567 EXPECT_EQ(base::ASCIIToUTF16("0foo"), suggestion_results[0]); | 1568 EXPECT_EQ(base::ASCIIToUTF16("0foo"), suggestion_results[0]); |
1568 EXPECT_EQ(base::ASCIIToUTF16("1foo"), suggestion_results[1]); | 1569 EXPECT_EQ(base::ASCIIToUTF16("1foo"), suggestion_results[1]); |
1569 EXPECT_EQ(base::ASCIIToUTF16("2foo"), suggestion_results[2]); | 1570 EXPECT_EQ(base::ASCIIToUTF16("2foo"), suggestion_results[2]); |
1570 EXPECT_EQ(base::ASCIIToUTF16("0bar"), suggestion_results[3]); | 1571 EXPECT_EQ(base::ASCIIToUTF16("0bar"), suggestion_results[3]); |
1571 EXPECT_EQ(base::ASCIIToUTF16("1bar"), suggestion_results[4]); | 1572 EXPECT_EQ(base::ASCIIToUTF16("1bar"), suggestion_results[4]); |
1572 } | 1573 } |
OLD | NEW |