| 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/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/prefs/pref_service.h" |
| 11 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
| 12 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
| 13 #include "base/values.h" | 14 #include "base/values.h" |
| 14 #include "chrome/browser/prefs/pref_service.h" | |
| 15 #include "chrome/browser/spellchecker/spelling_service_client.h" | 15 #include "chrome/browser/spellchecker/spelling_service_client.h" |
| 16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
| 17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
| 18 #include "chrome/common/spellcheck_result.h" | 18 #include "chrome/common/spellcheck_result.h" |
| 19 #include "chrome/test/base/testing_profile.h" | 19 #include "chrome/test/base/testing_profile.h" |
| 20 #include "net/base/load_flags.h" | 20 #include "net/base/load_flags.h" |
| 21 #include "net/url_request/test_url_fetcher_factory.h" | 21 #include "net/url_request/test_url_fetcher_factory.h" |
| 22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 "ro-RO", "ru-RU", "sk-SK", "sl-SI", "sh", "sr", "sv-SE", "tr-TR", | 371 "ro-RO", "ru-RU", "sk-SK", "sl-SI", "sh", "sr", "sv-SE", "tr-TR", |
| 372 "uk-UA", "vi-VN", | 372 "uk-UA", "vi-VN", |
| 373 #endif | 373 #endif |
| 374 }; | 374 }; |
| 375 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kUnsupported); ++i) { | 375 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kUnsupported); ++i) { |
| 376 pref->SetString(prefs::kSpellCheckDictionary, kUnsupported[i]); | 376 pref->SetString(prefs::kSpellCheckDictionary, kUnsupported[i]); |
| 377 EXPECT_TRUE(client_.IsAvailable(&profile_, kSuggest)); | 377 EXPECT_TRUE(client_.IsAvailable(&profile_, kSuggest)); |
| 378 EXPECT_FALSE(client_.IsAvailable(&profile_, kSpellcheck)); | 378 EXPECT_FALSE(client_.IsAvailable(&profile_, kSpellcheck)); |
| 379 } | 379 } |
| 380 } | 380 } |
| OLD | NEW |