| Index: content/shell/test_runner/mock_grammar_check.cc
|
| diff --git a/components/test_runner/mock_grammar_check.cc b/content/shell/test_runner/mock_grammar_check.cc
|
| similarity index 62%
|
| rename from components/test_runner/mock_grammar_check.cc
|
| rename to content/shell/test_runner/mock_grammar_check.cc
|
| index b1bdcebc2675af018e10514f9e3957430dd41002..93b0512ed346413952b60fac9e20b03ac4ee54b1 100644
|
| --- a/components/test_runner/mock_grammar_check.cc
|
| +++ b/content/shell/test_runner/mock_grammar_check.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "components/test_runner/mock_grammar_check.h"
|
| +#include "content/shell/test_runner/mock_grammar_check.h"
|
|
|
| #include <stddef.h>
|
|
|
| @@ -10,7 +10,7 @@
|
|
|
| #include "base/logging.h"
|
| #include "base/macros.h"
|
| -#include "components/test_runner/test_common.h"
|
| +#include "content/shell/test_runner/test_common.h"
|
| #include "third_party/WebKit/public/platform/WebString.h"
|
| #include "third_party/WebKit/public/web/WebTextCheckingResult.h"
|
|
|
| @@ -33,29 +33,28 @@ bool MockGrammarCheck::CheckGrammarOfString(
|
| int location;
|
| int length;
|
| } kGrammarErrors[] = {
|
| - {"I have a issue.", 7, 1},
|
| - {"I have an grape.", 7, 2},
|
| - {"I have an kiwi.", 7, 2},
|
| - {"I have an muscat.", 7, 2},
|
| - {"You has the right.", 4, 3},
|
| - {"apple orange zz.", 0, 16},
|
| - {"apple zz orange.", 0, 16},
|
| - {"apple,zz,orange.", 0, 16},
|
| - {"orange,zz,apple.", 0, 16},
|
| - {"the the adlj adaasj sdklj. there there", 4, 3},
|
| - {"the the adlj adaasj sdklj. there there", 33, 5},
|
| - {"zz apple orange.", 0, 16},
|
| - };
|
| + {"I have a issue.", 7, 1},
|
| + {"I have an grape.", 7, 2},
|
| + {"I have an kiwi.", 7, 2},
|
| + {"I have an muscat.", 7, 2},
|
| + {"You has the right.", 4, 3},
|
| + {"apple orange zz.", 0, 16},
|
| + {"apple zz orange.", 0, 16},
|
| + {"apple,zz,orange.", 0, 16},
|
| + {"orange,zz,apple.", 0, 16},
|
| + {"the the adlj adaasj sdklj. there there", 4, 3},
|
| + {"the the adlj adaasj sdklj. there there", 33, 5},
|
| + {"zz apple orange.", 0, 16},
|
| + };
|
| for (size_t i = 0; i < arraysize(kGrammarErrors); ++i) {
|
| size_t offset = 0;
|
| base::string16 error(
|
| kGrammarErrors[i].text,
|
| kGrammarErrors[i].text + strlen(kGrammarErrors[i].text));
|
| while ((offset = string_text.find(error, offset)) != base::string16::npos) {
|
| - results->push_back(
|
| - blink::WebTextCheckingResult(blink::WebTextDecorationTypeGrammar,
|
| - offset + kGrammarErrors[i].location,
|
| - kGrammarErrors[i].length));
|
| + results->push_back(blink::WebTextCheckingResult(
|
| + blink::WebTextDecorationTypeGrammar,
|
| + offset + kGrammarErrors[i].location, kGrammarErrors[i].length));
|
| offset += kGrammarErrors[i].length;
|
| }
|
| }
|
|
|