OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "components/test_runner/mock_grammar_check.h" | 5 #include "components/test_runner/mock_grammar_check.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <algorithm> | 9 #include <algorithm> |
8 | 10 |
9 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/macros.h" |
10 #include "components/test_runner/test_common.h" | 13 #include "components/test_runner/test_common.h" |
11 #include "third_party/WebKit/public/platform/WebCString.h" | 14 #include "third_party/WebKit/public/platform/WebCString.h" |
12 #include "third_party/WebKit/public/platform/WebString.h" | 15 #include "third_party/WebKit/public/platform/WebString.h" |
13 #include "third_party/WebKit/public/web/WebTextCheckingResult.h" | 16 #include "third_party/WebKit/public/web/WebTextCheckingResult.h" |
14 | 17 |
15 namespace test_runner { | 18 namespace test_runner { |
16 | 19 |
17 bool MockGrammarCheck::CheckGrammarOfString( | 20 bool MockGrammarCheck::CheckGrammarOfString( |
18 const blink::WebString& text, | 21 const blink::WebString& text, |
19 std::vector<blink::WebTextCheckingResult>* results) { | 22 std::vector<blink::WebTextCheckingResult>* results) { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 blink::WebTextCheckingResult(blink::WebTextDecorationTypeGrammar, | 57 blink::WebTextCheckingResult(blink::WebTextDecorationTypeGrammar, |
55 offset + kGrammarErrors[i].location, | 58 offset + kGrammarErrors[i].location, |
56 kGrammarErrors[i].length)); | 59 kGrammarErrors[i].length)); |
57 offset += kGrammarErrors[i].length; | 60 offset += kGrammarErrors[i].length; |
58 } | 61 } |
59 } | 62 } |
60 return false; | 63 return false; |
61 } | 64 } |
62 | 65 |
63 } // namespace test_runner | 66 } // namespace test_runner |
OLD | NEW |