| 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 TEST_F(SpellCheckTest, SpellCheckText) { | 492 #if defined(OS_WIN) |
| 493 // SpellCheckTest.SpellCheckText fails on Windows. |
| 494 // See http://crbug.com/689101. |
| 495 #define MAYBE_SpellCheckText DISABLED_SpellCheckText |
| 496 #else |
| 497 #define MAYBE_SpellCheckText SpellCheckText |
| 498 #endif // OS_WIN |
| 499 TEST_F(SpellCheckTest, MAYBE_SpellCheckText) { |
| 493 static const struct { | 500 static const struct { |
| 494 const char* language; | 501 const char* language; |
| 495 const wchar_t* input; | 502 const wchar_t* input; |
| 496 } kTestCases[] = { | 503 } kTestCases[] = { |
| 497 { | 504 { |
| 498 // Afrikaans | 505 // Afrikaans |
| 499 "af-ZA", | 506 "af-ZA", |
| 500 L"Google se missie is om die w\x00EAreld se inligting te organiseer en " | 507 L"Google se missie is om die w\x00EAreld se inligting te organiseer en " |
| 501 L"dit bruikbaar en toeganklik te maak." | 508 L"dit bruikbaar en toeganklik te maak." |
| 502 }, { | 509 }, { |
| (...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1556 // to be updated accordingly. | 1563 // to be updated accordingly. |
| 1557 ASSERT_EQ(5, spellcheck::kMaxSuggestions); | 1564 ASSERT_EQ(5, spellcheck::kMaxSuggestions); |
| 1558 FillSuggestions(suggestions_list, &suggestion_results); | 1565 FillSuggestions(suggestions_list, &suggestion_results); |
| 1559 ASSERT_EQ(5U, suggestion_results.size()); | 1566 ASSERT_EQ(5U, suggestion_results.size()); |
| 1560 EXPECT_EQ(base::ASCIIToUTF16("0foo"), suggestion_results[0]); | 1567 EXPECT_EQ(base::ASCIIToUTF16("0foo"), suggestion_results[0]); |
| 1561 EXPECT_EQ(base::ASCIIToUTF16("1foo"), suggestion_results[1]); | 1568 EXPECT_EQ(base::ASCIIToUTF16("1foo"), suggestion_results[1]); |
| 1562 EXPECT_EQ(base::ASCIIToUTF16("2foo"), suggestion_results[2]); | 1569 EXPECT_EQ(base::ASCIIToUTF16("2foo"), suggestion_results[2]); |
| 1563 EXPECT_EQ(base::ASCIIToUTF16("0bar"), suggestion_results[3]); | 1570 EXPECT_EQ(base::ASCIIToUTF16("0bar"), suggestion_results[3]); |
| 1564 EXPECT_EQ(base::ASCIIToUTF16("1bar"), suggestion_results[4]); | 1571 EXPECT_EQ(base::ASCIIToUTF16("1bar"), suggestion_results[4]); |
| 1565 } | 1572 } |
| OLD | NEW |