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

Unified Diff: chrome/renderer/spellchecker/spellcheck_provider_hunspell_unittest.cc

Issue 63273002: Rename WebKit namespace to blink (part 4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/spellchecker/spellcheck_provider_hunspell_unittest.cc
diff --git a/chrome/renderer/spellchecker/spellcheck_provider_hunspell_unittest.cc b/chrome/renderer/spellchecker/spellcheck_provider_hunspell_unittest.cc
index 11dcd9d2a7bb801892365a13d5f32ed3ab18432e..a08fb785442277709a9d05593136429c6768fdbf 100644
--- a/chrome/renderer/spellchecker/spellcheck_provider_hunspell_unittest.cc
+++ b/chrome/renderer/spellchecker/spellcheck_provider_hunspell_unittest.cc
@@ -18,7 +18,7 @@ namespace {
TEST_F(SpellCheckProviderTest, UsingHunspell) {
FakeTextCheckingCompletion completion;
- provider_.RequestTextChecking(WebKit::WebString("hello"),
+ provider_.RequestTextChecking(blink::WebString("hello"),
&completion,
std::vector<SpellCheckMarker>());
EXPECT_EQ(completion.completion_count_, 1U);
@@ -35,20 +35,20 @@ TEST_F(SpellCheckProviderTest, MultiLineText) {
// Verify that the SpellCheckProvider class does not spellcheck empty text.
provider_.ResetResult();
provider_.RequestTextChecking(
- WebKit::WebString(), &completion, std::vector<SpellCheckMarker>());
+ blink::WebString(), &completion, std::vector<SpellCheckMarker>());
EXPECT_TRUE(provider_.text_.empty());
// Verify that the SpellCheckProvider class does not spellcheck text while we
// are typing a word.
provider_.ResetResult();
provider_.RequestTextChecking(
- WebKit::WebString("First"), &completion, std::vector<SpellCheckMarker>());
+ blink::WebString("First"), &completion, std::vector<SpellCheckMarker>());
EXPECT_TRUE(provider_.text_.empty());
// Verify that the SpellCheckProvider class spellcheck the first word when we
// type a space key, i.e. when we finish typing a word.
provider_.ResetResult();
- provider_.RequestTextChecking(WebKit::WebString("First "),
+ provider_.RequestTextChecking(blink::WebString("First "),
&completion,
std::vector<SpellCheckMarker>());
EXPECT_EQ(ASCIIToUTF16("First "), provider_.text_);
@@ -56,7 +56,7 @@ TEST_F(SpellCheckProviderTest, MultiLineText) {
// Verify that the SpellCheckProvider class spellcheck the first line when we
// type a return key, i.e. when we finish typing a line.
provider_.ResetResult();
- provider_.RequestTextChecking(WebKit::WebString("First Second\n"),
+ provider_.RequestTextChecking(blink::WebString("First Second\n"),
&completion,
std::vector<SpellCheckMarker>());
EXPECT_EQ(ASCIIToUTF16("First Second\n"), provider_.text_);
@@ -64,7 +64,7 @@ TEST_F(SpellCheckProviderTest, MultiLineText) {
// Verify that the SpellCheckProvider class spellcheck the lines when we
// finish typing a word "Third" to the second line.
provider_.ResetResult();
- provider_.RequestTextChecking(WebKit::WebString("First Second\nThird "),
+ provider_.RequestTextChecking(blink::WebString("First Second\nThird "),
&completion,
std::vector<SpellCheckMarker>());
EXPECT_EQ(ASCIIToUTF16("First Second\nThird "), provider_.text_);
@@ -72,7 +72,7 @@ TEST_F(SpellCheckProviderTest, MultiLineText) {
// Verify that the SpellCheckProvider class does not send a spellcheck request
// when a user inserts whitespace characters.
provider_.ResetResult();
- provider_.RequestTextChecking(WebKit::WebString("First Second\nThird "),
+ provider_.RequestTextChecking(blink::WebString("First Second\nThird "),
&completion,
std::vector<SpellCheckMarker>());
EXPECT_TRUE(provider_.text_.empty());
@@ -81,7 +81,7 @@ TEST_F(SpellCheckProviderTest, MultiLineText) {
// a period.
provider_.ResetResult();
provider_.RequestTextChecking(
- WebKit::WebString("First Second\nThird Fourth."),
+ blink::WebString("First Second\nThird Fourth."),
&completion,
std::vector<SpellCheckMarker>());
EXPECT_EQ(ASCIIToUTF16("First Second\nThird Fourth."), provider_.text_);
@@ -91,7 +91,7 @@ TEST_F(SpellCheckProviderTest, MultiLineText) {
// spelling service when not necessary.
TEST_F(SpellCheckProviderTest, CancelUnnecessaryRequests) {
FakeTextCheckingCompletion completion;
- provider_.RequestTextChecking(WebKit::WebString("hello."),
+ provider_.RequestTextChecking(blink::WebString("hello."),
&completion,
std::vector<SpellCheckMarker>());
EXPECT_EQ(completion.completion_count_, 1U);
@@ -100,7 +100,7 @@ TEST_F(SpellCheckProviderTest, CancelUnnecessaryRequests) {
// Test that the SpellCheckProvider does not send a request with the same text
// as above.
- provider_.RequestTextChecking(WebKit::WebString("hello."),
+ provider_.RequestTextChecking(blink::WebString("hello."),
&completion,
std::vector<SpellCheckMarker>());
EXPECT_EQ(completion.completion_count_, 2U);
@@ -109,7 +109,7 @@ TEST_F(SpellCheckProviderTest, CancelUnnecessaryRequests) {
// Test that the SpellCheckProvider class cancels an incoming request that
// does not include any words.
- provider_.RequestTextChecking(WebKit::WebString(":-)"),
+ provider_.RequestTextChecking(blink::WebString(":-)"),
&completion,
std::vector<SpellCheckMarker>());
EXPECT_EQ(completion.completion_count_, 3U);
@@ -119,7 +119,7 @@ TEST_F(SpellCheckProviderTest, CancelUnnecessaryRequests) {
// Test that the SpellCheckProvider class sends a request when it receives a
// Russian word.
const wchar_t kRussianWord[] = L"\x0431\x0451\x0434\x0440\x0430";
- provider_.RequestTextChecking(WebKit::WebString(WideToUTF16(kRussianWord)),
+ provider_.RequestTextChecking(blink::WebString(WideToUTF16(kRussianWord)),
&completion,
std::vector<SpellCheckMarker>());
EXPECT_EQ(completion.completion_count_, 4U);
@@ -134,20 +134,20 @@ TEST_F(SpellCheckProviderTest, CompleteNecessaryRequests) {
string16 text = ASCIIToUTF16("Icland is an icland ");
provider_.RequestTextChecking(
- WebKit::WebString(text), &completion, std::vector<SpellCheckMarker>());
+ blink::WebString(text), &completion, std::vector<SpellCheckMarker>());
EXPECT_EQ(0U, completion.cancellation_count_) << "Should finish checking \""
<< text << "\"";
const int kSubstringLength = 18;
string16 substring = text.substr(0, kSubstringLength);
- provider_.RequestTextChecking(WebKit::WebString(substring),
+ provider_.RequestTextChecking(blink::WebString(substring),
&completion,
std::vector<SpellCheckMarker>());
EXPECT_EQ(0U, completion.cancellation_count_) << "Should finish checking \""
<< substring << "\"";
provider_.RequestTextChecking(
- WebKit::WebString(text), &completion, std::vector<SpellCheckMarker>());
+ blink::WebString(text), &completion, std::vector<SpellCheckMarker>());
EXPECT_EQ(0U, completion.cancellation_count_) << "Should finish checking \""
<< text << "\"";
}
@@ -156,21 +156,21 @@ TEST_F(SpellCheckProviderTest, CompleteNecessaryRequests) {
// a word.
TEST_F(SpellCheckProviderTest, CancelMidWordRequests) {
FakeTextCheckingCompletion completion;
- provider_.RequestTextChecking(WebKit::WebString("hello "),
+ provider_.RequestTextChecking(blink::WebString("hello "),
&completion,
std::vector<SpellCheckMarker>());
EXPECT_EQ(completion.completion_count_, 1U);
EXPECT_EQ(completion.cancellation_count_, 0U);
EXPECT_EQ(provider_.spelling_service_call_count_, 1U);
- provider_.RequestTextChecking(WebKit::WebString("hello world"),
+ provider_.RequestTextChecking(blink::WebString("hello world"),
&completion,
std::vector<SpellCheckMarker>());
EXPECT_EQ(completion.completion_count_, 2U);
EXPECT_EQ(completion.cancellation_count_, 1U);
EXPECT_EQ(provider_.spelling_service_call_count_, 1U);
- provider_.RequestTextChecking(WebKit::WebString("hello world."),
+ provider_.RequestTextChecking(blink::WebString("hello world."),
&completion,
std::vector<SpellCheckMarker>());
EXPECT_EQ(completion.completion_count_, 3U);
« no previous file with comments | « chrome/renderer/spellchecker/spellcheck_provider.cc ('k') | chrome/renderer/spellchecker/spellcheck_provider_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698