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

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

Issue 2730663003: [spellcheck] Narrowly re-enabled some unit tests for Windows (Closed)
Patch Set: Created 3 years, 9 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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 break; 483 break;
484 } 484 }
485 } 485 }
486 486
487 EXPECT_TRUE(suggested_word_is_present); 487 EXPECT_TRUE(suggested_word_is_present);
488 } 488 }
489 } 489 }
490 490
491 // This test verifies our spellchecker can split a text into words and check 491 // This test verifies our spellchecker can split a text into words and check
492 // the spelling of each word in the text. 492 // the spelling of each word in the text.
493 #if defined(OS_WIN) 493 TEST_F(SpellCheckTest, SpellCheckText) {
494 // SpellCheckTest.SpellCheckText fails on Windows.
495 // See http://crbug.com/689101.
496 #define MAYBE_SpellCheckText DISABLED_SpellCheckText
497 #else
498 #define MAYBE_SpellCheckText SpellCheckText
499 #endif // OS_WIN
500 TEST_F(SpellCheckTest, MAYBE_SpellCheckText) {
501 static const struct { 494 static const struct {
502 const char* language; 495 const char* language;
503 const wchar_t* input; 496 const wchar_t* input;
504 } kTestCases[] = { 497 } kTestCases[] = {
505 { 498 {
506 // Afrikaans 499 // Afrikaans
507 "af-ZA", 500 "af-ZA",
508 L"Google se missie is om die w\x00EAreld se inligting te organiseer en " 501 L"Google se missie is om die w\x00EAreld se inligting te organiseer en "
509 L"dit bruikbaar en toeganklik te maak." 502 L"dit bruikbaar en toeganklik te maak."
510 }, { 503 }, {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 L"Google \x0915\x093E \x092E\x093F\x0936\x0928 " 620 L"Google \x0915\x093E \x092E\x093F\x0936\x0928 "
628 L"\x0926\x0941\x0928\x093F\x092F\x093E \x0915\x0940 " 621 L"\x0926\x0941\x0928\x093F\x092F\x093E \x0915\x0940 "
629 L"\x091C\x093E\x0928\x0915\x093E\x0930\x0940 \x0915\x094B " 622 L"\x091C\x093E\x0928\x0915\x093E\x0930\x0940 \x0915\x094B "
630 L"\x0935\x094D\x092F\x0935\x0938\x094D\x0925\x093F\x0924 " 623 L"\x0935\x094D\x092F\x0935\x0938\x094D\x0925\x093F\x0924 "
631 L"\x0915\x0930\x0928\x093E \x0914\x0930 \x0909\x0938\x0947 " 624 L"\x0915\x0930\x0928\x093E \x0914\x0930 \x0909\x0938\x0947 "
632 L"\x0938\x093E\x0930\x094D\x0935\x092D\x094C\x092E\x093F\x0915 " 625 L"\x0938\x093E\x0930\x094D\x0935\x092D\x094C\x092E\x093F\x0915 "
633 L"\x0930\x0942\x092A \x0938\x0947 \x092A\x0939\x0941\x0901\x091A " 626 L"\x0930\x0942\x092A \x0938\x0947 \x092A\x0939\x0941\x0901\x091A "
634 L"\x092E\x0947\x0902 \x0914\x0930 \x0909\x092A\x092F\x094B\x0917\x0940 " 627 L"\x092E\x0947\x0902 \x0914\x0930 \x0909\x092A\x092F\x094B\x0917\x0940 "
635 L"\x092C\x0928\x093E\x0928\x093E \x0939\x0948." 628 L"\x092C\x0928\x093E\x0928\x093E \x0939\x0948."
636 }, { 629 }, {
630 #if !defined(OS_WIN)
637 // Hungarian 631 // Hungarian
638 "hu-HU", 632 "hu-HU",
639 L"A Google azt a k\x00FCldet\x00E9st v\x00E1llalta mag\x00E1ra, " 633 L"A Google azt a k\x00FCldet\x00E9st v\x00E1llalta mag\x00E1ra, "
640 L"hogy a vil\x00E1gon fellelhet\x0151 inform\x00E1\x0063i\x00F3kat " 634 L"hogy a vil\x00E1gon fellelhet\x0151 inform\x00E1\x0063i\x00F3kat "
641 L"rendszerezze \x00E9s \x00E1ltal\x00E1nosan el\x00E9rhet\x0151v\x00E9, " 635 L"rendszerezze \x00E9s \x00E1ltal\x00E1nosan el\x00E9rhet\x0151v\x00E9, "
642 L"illetve haszn\x00E1lhat\x00F3v\x00E1 tegye." 636 L"illetve haszn\x00E1lhat\x00F3v\x00E1 tegye."
643 }, { 637 }, {
638 #endif // !defined(OS_WIN)
644 // Croatian 639 // Croatian
645 "hr-HR", 640 "hr-HR",
646 // L"Googleova " - to be added. 641 // L"Googleova " - to be added.
647 L"je misija organizirati svjetske informacije i u\x010Diniti ih " 642 L"je misija organizirati svjetske informacije i u\x010Diniti ih "
648 // L"univerzalno " - to be added. 643 // L"univerzalno " - to be added.
649 L"pristupa\x010Dnima i korisnima." 644 L"pristupa\x010Dnima i korisnima."
650 }, { 645 }, {
651 // Indonesian 646 // Indonesian
652 "id-ID", 647 "id-ID",
653 L"Misi Google adalah untuk mengelola informasi dunia dan membuatnya " 648 L"Misi Google adalah untuk mengelola informasi dunia dan membuatnya "
(...skipping 25 matching lines...) Expand all
679 "nl-NL", 674 "nl-NL",
680 L"Het doel van Google is om alle informatie wereldwijd toegankelijk " 675 L"Het doel van Google is om alle informatie wereldwijd toegankelijk "
681 L"en bruikbaar te maken." 676 L"en bruikbaar te maken."
682 }, { 677 }, {
683 // Polish 678 // Polish
684 "pl-PL", 679 "pl-PL",
685 L"Misj\x0105 Google jest uporz\x0105" L"dkowanie \x015Bwiatowych " 680 L"Misj\x0105 Google jest uporz\x0105" L"dkowanie \x015Bwiatowych "
686 L"zasob\x00F3w informacji, aby sta\x0142y si\x0119 one powszechnie " 681 L"zasob\x00F3w informacji, aby sta\x0142y si\x0119 one powszechnie "
687 L"dost\x0119pne i u\x017Cyteczne." 682 L"dost\x0119pne i u\x017Cyteczne."
688 }, { 683 }, {
684 #if !defined(OS_WIN)
689 // Portuguese (Brazil) 685 // Portuguese (Brazil)
690 "pt-BR", 686 "pt-BR",
691 L"A miss\x00E3o do " 687 L"A miss\x00E3o do "
692 #if !defined(OS_MACOSX) 688 #if !defined(OS_MACOSX)
693 L"Google " 689 L"Google "
694 #endif 690 #endif
695 L"\x00E9 organizar as informa\x00E7\x00F5" 691 L"\x00E9 organizar as informa\x00E7\x00F5"
696 L"es do mundo todo e " 692 L"es do mundo todo e "
697 #if !defined(OS_MACOSX) 693 #if !defined(OS_MACOSX)
698 L"torn\x00E1-las " 694 L"torn\x00E1-las "
699 #endif 695 #endif
700 L"acess\x00EDveis e \x00FAteis em car\x00E1ter universal." 696 L"acess\x00EDveis e \x00FAteis em car\x00E1ter universal."
701 }, { 697 }, {
698 #endif // !defined(OS_WIN)
702 // Portuguese (Portugal) 699 // Portuguese (Portugal)
703 "pt-PT", 700 "pt-PT",
704 L"O " 701 L"O "
705 #if !defined(OS_MACOSX) 702 #if !defined(OS_MACOSX)
706 L"Google " 703 L"Google "
707 #endif 704 #endif
708 L"tem por miss\x00E3o organizar a informa\x00E7\x00E3o do " 705 L"tem por miss\x00E3o organizar a informa\x00E7\x00E3o do "
709 L"mundo e " 706 L"mundo e "
710 #if !defined(OS_MACOSX) 707 #if !defined(OS_MACOSX)
711 L"torn\x00E1-la " 708 L"torn\x00E1-la "
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 "sl-SI", 758 "sl-SI",
762 // L"Googlovo " - to be added. 759 // L"Googlovo " - to be added.
763 L"poslanstvo je organizirati svetovne informacije in " 760 L"poslanstvo je organizirati svetovne informacije in "
764 L"omogo\x010Diti njihovo dostopnost in s tem uporabnost za vse." 761 L"omogo\x010Diti njihovo dostopnost in s tem uporabnost za vse."
765 }, { 762 }, {
766 // Swedish 763 // Swedish
767 "sv-SE", 764 "sv-SE",
768 L"Googles m\x00E5ls\x00E4ttning \x00E4r att ordna v\x00E4rldens " 765 L"Googles m\x00E5ls\x00E4ttning \x00E4r att ordna v\x00E4rldens "
769 L"samlade information och g\x00F6ra den tillg\x00E4nglig f\x00F6r alla." 766 L"samlade information och g\x00F6ra den tillg\x00E4nglig f\x00F6r alla."
770 }, { 767 }, {
768 #if !defined(OS_WIN)
771 // Turkish 769 // Turkish
772 "tr-TR", 770 "tr-TR",
773 // L"Google\x2019\x0131n " - to be added. 771 // L"Google\x2019\x0131n " - to be added.
774 L"misyonu, d\x00FCnyadaki t\x00FCm bilgileri " 772 L"misyonu, d\x00FCnyadaki t\x00FCm bilgileri "
775 L"organize etmek ve evrensel olarak eri\x015Filebilir ve " 773 L"organize etmek ve evrensel olarak eri\x015Filebilir ve "
776 L"kullan\x0131\x015Fl\x0131 k\x0131lmakt\x0131r." 774 L"kullan\x0131\x015Fl\x0131 k\x0131lmakt\x0131r."
777 }, { 775 }, {
776 #endif // !defined(OS_WIN)
778 // Ukranian 777 // Ukranian
779 "uk-UA", 778 "uk-UA",
780 L"\x041c\x0456\x0441\x0456\x044f " 779 L"\x041c\x0456\x0441\x0456\x044f "
781 L"\x043a\x043e\x043c\x043f\x0430\x043d\x0456\x0457 Google " 780 L"\x043a\x043e\x043c\x043f\x0430\x043d\x0456\x0457 Google "
782 L"\x043f\x043e\x043b\x044f\x0433\x0430\x0454 \x0432 " 781 L"\x043f\x043e\x043b\x044f\x0433\x0430\x0454 \x0432 "
783 L"\x0442\x043e\x043c\x0443, \x0449\x043e\x0431 " 782 L"\x0442\x043e\x043c\x0443, \x0449\x043e\x0431 "
784 L"\x0443\x043f\x043e\x0440\x044f\x0434\x043a\x0443\x0432\x0430\x0442" 783 L"\x0443\x043f\x043e\x0440\x044f\x0434\x043a\x0443\x0432\x0430\x0442"
785 L"\x0438 \x0456\x043d\x0444\x043e\x0440\x043c\x0430\x0446\x0456\x044e " 784 L"\x0438 \x0456\x043d\x0444\x043e\x0440\x043c\x0430\x0446\x0456\x044e "
786 L"\x0437 \x0443\x0441\x044c\x043e\x0433\x043e " 785 L"\x0437 \x0443\x0441\x044c\x043e\x0433\x043e "
787 L"\x0441\x0432\x0456\x0442\x0443 \x0442\x0430 " 786 L"\x0441\x0432\x0456\x0442\x0443 \x0442\x0430 "
788 L"\x0437\x0440\x043e\x0431\x0438\x0442\x0438 \x0457\x0457 " 787 L"\x0437\x0440\x043e\x0431\x0438\x0442\x0438 \x0457\x0457 "
789 L"\x0443\x043d\x0456\x0432\x0435\x0440\x0441\x0430\x043b\x044c\x043d" 788 L"\x0443\x043d\x0456\x0432\x0435\x0440\x0441\x0430\x043b\x044c\x043d"
790 L"\x043e \x0434\x043e\x0441\x0442\x0443\x043f\x043d\x043e\x044e " 789 L"\x043e \x0434\x043e\x0441\x0442\x0443\x043f\x043d\x043e\x044e "
791 L"\x0442\x0430 \x043a\x043e\x0440\x0438\x0441\x043d\x043e\x044e." 790 L"\x0442\x0430 \x043a\x043e\x0440\x0438\x0441\x043d\x043e\x044e."
792 }, { 791 }, {
793 // Vietnamese 792 // Vietnamese
794 "vi-VN", 793 "vi-VN",
795 L"Nhi\x1EC7m v\x1EE5 c\x1EE7\x0061 " 794 L"Nhi\x1EC7m v\x1EE5 c\x1EE7\x0061 "
796 L"Google la \x0111\x1EC3 t\x1ED5 ch\x1EE9\x0063 " 795 L"Google la \x0111\x1EC3 t\x1ED5 ch\x1EE9\x0063 "
797 L"c\x00E1\x0063 th\x00F4ng tin c\x1EE7\x0061 " 796 L"c\x00E1\x0063 th\x00F4ng tin c\x1EE7\x0061 "
798 L"th\x1EBF gi\x1EDBi va l\x00E0m cho n\x00F3 universal c\x00F3 " 797 L"th\x1EBF gi\x1EDBi va l\x00E0m cho n\x00F3 universal c\x00F3 "
799 L"th\x1EC3 truy c\x1EADp va h\x1EEFu d\x1EE5ng h\x01A1n." 798 L"th\x1EC3 truy c\x1EADp va h\x1EEFu d\x1EE5ng h\x01A1n."
800 }, { 799 }, {
800 #if !defined(OS_WIN)
801 // Korean 801 // Korean
802 "ko", 802 "ko",
803 L"Google\xC758 \xBAA9\xD45C\xB294 \xC804\xC138\xACC4\xC758 " 803 L"Google\xC758 \xBAA9\xD45C\xB294 \xC804\xC138\xACC4\xC758 "
804 L"\xC815\xBCF4\xB97C \xCCB4\xACC4\xD654\xD558\xC5EC \xBAA8\xB450\xAC00 " 804 L"\xC815\xBCF4\xB97C \xCCB4\xACC4\xD654\xD558\xC5EC \xBAA8\xB450\xAC00 "
805 L"\xD3B8\xB9AC\xD558\xAC8C \xC774\xC6A9\xD560 \xC218 " 805 L"\xD3B8\xB9AC\xD558\xAC8C \xC774\xC6A9\xD560 \xC218 "
806 L"\xC788\xB3C4\xB85D \xD558\xB294 \xAC83\xC785\xB2C8\xB2E4." 806 L"\xC788\xB3C4\xB85D \xD558\xB294 \xAC83\xC785\xB2C8\xB2E4."
807 }, { 807 }, {
808 #endif // !defined(OS_WIN)
808 // Albanian 809 // Albanian
809 "sq", 810 "sq",
810 L"Misioni i Google \x00EBsht\x00EB q\x00EB t\x00EB organizoj\x00EB " 811 L"Misioni i Google \x00EBsht\x00EB q\x00EB t\x00EB organizoj\x00EB "
811 L"informacionin e bot\x00EBs dhe t\x00EB b\x00EBjn\x00EB at\x00EB " 812 L"informacionin e bot\x00EBs dhe t\x00EB b\x00EBjn\x00EB at\x00EB "
812 L"universalisht t\x00EB arritshme dhe t\x00EB dobishme." 813 L"universalisht t\x00EB arritshme dhe t\x00EB dobishme."
813 }, { 814 }, {
814 // Tamil 815 // Tamil
815 "ta", 816 "ta",
816 L"Google \x0B87\x0BA9\x0BCD " 817 L"Google \x0B87\x0BA9\x0BCD "
817 L"\x0BA8\x0BC7\x0BBE\x0B95\x0BCD\x0B95\x0BAE\x0BCD " 818 L"\x0BA8\x0BC7\x0BBE\x0B95\x0BCD\x0B95\x0BAE\x0BCD "
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 // to be updated accordingly. 1565 // to be updated accordingly.
1565 ASSERT_EQ(5, spellcheck::kMaxSuggestions); 1566 ASSERT_EQ(5, spellcheck::kMaxSuggestions);
1566 FillSuggestions(suggestions_list, &suggestion_results); 1567 FillSuggestions(suggestions_list, &suggestion_results);
1567 ASSERT_EQ(5U, suggestion_results.size()); 1568 ASSERT_EQ(5U, suggestion_results.size());
1568 EXPECT_EQ(base::ASCIIToUTF16("0foo"), suggestion_results[0]); 1569 EXPECT_EQ(base::ASCIIToUTF16("0foo"), suggestion_results[0]);
1569 EXPECT_EQ(base::ASCIIToUTF16("1foo"), suggestion_results[1]); 1570 EXPECT_EQ(base::ASCIIToUTF16("1foo"), suggestion_results[1]);
1570 EXPECT_EQ(base::ASCIIToUTF16("2foo"), suggestion_results[2]); 1571 EXPECT_EQ(base::ASCIIToUTF16("2foo"), suggestion_results[2]);
1571 EXPECT_EQ(base::ASCIIToUTF16("0bar"), suggestion_results[3]); 1572 EXPECT_EQ(base::ASCIIToUTF16("0bar"), suggestion_results[3]);
1572 EXPECT_EQ(base::ASCIIToUTF16("1bar"), suggestion_results[4]); 1573 EXPECT_EQ(base::ASCIIToUTF16("1bar"), suggestion_results[4]);
1573 } 1574 }
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