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

Side by Side Diff: webkit/tools/test_shell/mock_spellcheck_unittest.cc

Issue 3404027: webkit: Append base:: in the StringPrintf calls. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 2 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 | « webkit/support/webkit_support.cc ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | 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) 2010 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include "base/format_macros.h" 5 #include "base/format_macros.h"
6 #include "base/string_util.h" 6 #include "base/string_util.h"
7 #include "base/stringprintf.h"
7 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
8 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
9 #include "webkit/tools/test_shell/mock_spellcheck.h" 10 #include "webkit/tools/test_shell/mock_spellcheck.h"
10 11
11 class MockSpellCheckTest : public testing::Test { 12 class MockSpellCheckTest : public testing::Test {
12 public: 13 public:
13 MockSpellCheckTest() { 14 MockSpellCheckTest() {
14 } 15 }
15 16
16 ~MockSpellCheckTest() { 17 ~MockSpellCheckTest() {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 {L" " L"ifmmp", false, 1, 5}, 57 {L" " L"ifmmp", false, 1, 5},
57 {L"ifmmp" L" ", false, 0, 5}, 58 {L"ifmmp" L" ", false, 0, 5},
58 {L"ifmmp" L" " L"ifmmp", false, 0, 5}, 59 {L"ifmmp" L" " L"ifmmp", false, 0, 5},
59 60
60 {L"qwertyuiopasd", false, 0, 13}, 61 {L"qwertyuiopasd", false, 0, 13},
61 {L"qwertyuiopasdf", false, 0, 14}, 62 {L"qwertyuiopasdf", false, 0, 14},
62 }; 63 };
63 64
64 MockSpellCheck spellchecker; 65 MockSpellCheck spellchecker;
65 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) { 66 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) {
66 SCOPED_TRACE(StringPrintf("kTestCases[%" PRIuS "]", i)); 67 SCOPED_TRACE(base::StringPrintf("kTestCases[%" PRIuS "]", i));
67 68
68 std::wstring input(kTestCases[i].input); 69 std::wstring input(kTestCases[i].input);
69 int misspelling_start; 70 int misspelling_start;
70 int misspelling_length; 71 int misspelling_length;
71 bool result = spellchecker.SpellCheckWord(WideToUTF16(input), 72 bool result = spellchecker.SpellCheckWord(WideToUTF16(input),
72 &misspelling_start, 73 &misspelling_start,
73 &misspelling_length); 74 &misspelling_length);
74 75
75 EXPECT_EQ(kTestCases[i].expected_result, result); 76 EXPECT_EQ(kTestCases[i].expected_result, result);
76 EXPECT_EQ(kTestCases[i].misspelling_start, misspelling_start); 77 EXPECT_EQ(kTestCases[i].misspelling_start, misspelling_start);
77 EXPECT_EQ(kTestCases[i].misspelling_length, misspelling_length); 78 EXPECT_EQ(kTestCases[i].misspelling_length, misspelling_length);
78 } 79 }
79 } 80 }
OLDNEW
« no previous file with comments | « webkit/support/webkit_support.cc ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698