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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_util_unittest.cc

Issue 7628006: GTTF: Use a fresh TestingBrowserProcess for each test, part #6 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 9 years, 4 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/cookie_fetcher_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/input_method/input_method_util.h" 5 #include "chrome/browser/chromeos/input_method/input_method_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/chromeos/cros/cros_library.h" 10 #include "chrome/browser/chromeos/cros/cros_library.h"
11 #include "chrome/test/base/testing_browser_process_test.h"
11 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
12 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
13 #include "ui/base/l10n/l10n_util.h" 14 #include "ui/base/l10n/l10n_util.h"
14 15
15 namespace chromeos { 16 namespace chromeos {
16 namespace input_method { 17 namespace input_method {
17 18
18 namespace { 19 namespace {
19 InputMethodDescriptor GetDesc(const std::string& id, 20 InputMethodDescriptor GetDesc(const std::string& id,
20 const std::string& raw_layout, 21 const std::string& raw_layout,
21 const std::string& language_code) { 22 const std::string& language_code) {
22 return InputMethodDescriptor::CreateInputMethodDescriptor( 23 return InputMethodDescriptor::CreateInputMethodDescriptor(
23 id, raw_layout, language_code); 24 id, raw_layout, language_code);
24 } 25 }
25 } // namespace 26 } // namespace
26 27
27 class InputMethodUtilTest : public testing::Test { 28 class InputMethodUtilTest : public TestingBrowserProcessTest {
28 public: 29 public:
29 static void SetUpTestCase() { 30 static void SetUpTestCase() {
30 // Reload the internal maps before running tests, with the stub 31 // Reload the internal maps before running tests, with the stub
31 // libcros enabled, so that test data is loaded properly. 32 // libcros enabled, so that test data is loaded properly.
32 ScopedStubCrosEnabler stub_cros_enabler; 33 ScopedStubCrosEnabler stub_cros_enabler;
33 ReloadInternalMaps(); 34 ReloadInternalMaps();
34 } 35 }
35 36
36 private: 37 private:
37 // Ensure we always use the stub libcros in each test. 38 // Ensure we always use the stub libcros in each test.
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 std::vector<std::string> language_codes; 312 std::vector<std::string> language_codes;
312 GetLanguageCodesFromInputMethodIds(input_method_ids, &language_codes); 313 GetLanguageCodesFromInputMethodIds(input_method_ids, &language_codes);
313 ASSERT_EQ(3U, language_codes.size()); 314 ASSERT_EQ(3U, language_codes.size());
314 EXPECT_EQ("en-US", language_codes[0]); 315 EXPECT_EQ("en-US", language_codes[0]);
315 EXPECT_EQ("ja", language_codes[1]); 316 EXPECT_EQ("ja", language_codes[1]);
316 EXPECT_EQ("fr", language_codes[2]); 317 EXPECT_EQ("fr", language_codes[2]);
317 } 318 }
318 319
319 } // namespace input_method 320 } // namespace input_method
320 } // namespace chromeos 321 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/cookie_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698