| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 EXPECT_TRUE(value->GetString("apiVersion", &version)); | 64 EXPECT_TRUE(value->GetString("apiVersion", &version)); |
| 65 EXPECT_EQ(version_, version); | 65 EXPECT_EQ(version_, version); |
| 66 std::string text; | 66 std::string text; |
| 67 EXPECT_TRUE(value->GetString("params.text", &text)); | 67 EXPECT_TRUE(value->GetString("params.text", &text)); |
| 68 EXPECT_EQ(text_, text); | 68 EXPECT_EQ(text_, text); |
| 69 std::string language; | 69 std::string language; |
| 70 EXPECT_TRUE(value->GetString("params.language", &language)); | 70 EXPECT_TRUE(value->GetString("params.language", &language)); |
| 71 EXPECT_EQ(language_, language); | 71 EXPECT_EQ(language_, language); |
| 72 ASSERT_TRUE(GetExpectedCountry(language, &country_)); | 72 ASSERT_TRUE(GetExpectedCountry(language, &country_)); |
| 73 std::string country; | 73 std::string country; |
| 74 EXPECT_TRUE(value->GetString("params.origin_country", &country)); | 74 EXPECT_TRUE(value->GetString("params.originCountry", &country)); |
| 75 EXPECT_EQ(country_, country); | 75 EXPECT_EQ(country_, country); |
| 76 | 76 |
| 77 net::TestURLFetcher::SetUploadData(upload_content_type, upload_content); | 77 net::TestURLFetcher::SetUploadData(upload_content_type, upload_content); |
| 78 } | 78 } |
| 79 | 79 |
| 80 virtual void Start() OVERRIDE { | 80 virtual void Start() OVERRIDE { |
| 81 // Verify that this client does not either send cookies to the Spelling | 81 // Verify that this client does not either send cookies to the Spelling |
| 82 // service or accept cookies from it. | 82 // service or accept cookies from it. |
| 83 EXPECT_EQ(net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES, | 83 EXPECT_EQ(net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES, |
| 84 GetLoadFlags()); | 84 GetLoadFlags()); |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 "it-IT", "lt-LT", "lv-LV", "nb-NO", "nl-NL", "pl-PL", "pt-BR", "pt-PT", | 362 "it-IT", "lt-LT", "lv-LV", "nb-NO", "nl-NL", "pl-PL", "pt-BR", "pt-PT", |
| 363 "ro-RO", "ru-RU", "sk-SK", "sl-SI", "sh", "sr", "sv-SE", "tr-TR", | 363 "ro-RO", "ru-RU", "sk-SK", "sl-SI", "sh", "sr", "sv-SE", "tr-TR", |
| 364 "uk-UA", "vi-VN", | 364 "uk-UA", "vi-VN", |
| 365 }; | 365 }; |
| 366 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kUnsupported); ++i) { | 366 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kUnsupported); ++i) { |
| 367 pref->SetString(prefs::kSpellCheckDictionary, kUnsupported[i]); | 367 pref->SetString(prefs::kSpellCheckDictionary, kUnsupported[i]); |
| 368 EXPECT_TRUE(client_.IsAvailable(&profile_, kSuggest)); | 368 EXPECT_TRUE(client_.IsAvailable(&profile_, kSuggest)); |
| 369 EXPECT_FALSE(client_.IsAvailable(&profile_, kSpellcheck)); | 369 EXPECT_FALSE(client_.IsAvailable(&profile_, kSpellcheck)); |
| 370 } | 370 } |
| 371 } | 371 } |
| OLD | NEW |