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

Side by Side Diff: components/spellcheck/browser/misspelling_unittest.cc

Issue 2159283003: [WIP][DO NOT LAND] Componentize spellcheck Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 // Unit tests for |Misspelling| object. 5 // Unit tests for |Misspelling| object.
6 6
7 #include "chrome/browser/spellchecker/misspelling.h" 7 #include "components/spellcheck/browser/misspelling.h"
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 TEST(MisspellingTest, SerializeTest) { 14 TEST(MisspellingTest, SerializeTest) {
15 Misspelling misspelling; 15 Misspelling misspelling;
16 misspelling.context = base::ASCIIToUTF16("How doe sit know"); 16 misspelling.context = base::ASCIIToUTF16("How doe sit know");
17 misspelling.location = 4; 17 misspelling.location = 4;
(...skipping 26 matching lines...) Expand all
44 misspelling.length = 0; 44 misspelling.length = 0;
45 EXPECT_EQ(base::string16(), GetMisspelledString(misspelling)); 45 EXPECT_EQ(base::string16(), GetMisspelledString(misspelling));
46 46
47 misspelling.location = misspelling.context.length(); 47 misspelling.location = misspelling.context.length();
48 misspelling.length = 7; 48 misspelling.length = 7;
49 EXPECT_EQ(base::string16(), GetMisspelledString(misspelling)); 49 EXPECT_EQ(base::string16(), GetMisspelledString(misspelling));
50 50
51 misspelling.location = misspelling.context.length() + 1; 51 misspelling.location = misspelling.context.length() + 1;
52 EXPECT_EQ(base::string16(), GetMisspelledString(misspelling)); 52 EXPECT_EQ(base::string16(), GetMisspelledString(misspelling));
53 } 53 }
OLDNEW
« no previous file with comments | « components/spellcheck/browser/misspelling.cc ('k') | components/spellcheck/browser/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698