Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / remoting / base / resources_unittest.cc
blob6511967655a38108385dd73b1d9ae298a14d3d5b
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
3 // found in the LICENSE file.
5 #include "remoting/base/resources.h"
7 #include "remoting/base/string_resources.h"
8 #include "ui/base/l10n/l10n_util.h"
9 #include "testing/gtest/include/gtest/gtest.h"
11 namespace remoting {
13 class ResourcesTest : public testing::Test {
14 protected:
15 ResourcesTest(): resources_available_(false) {
18 virtual void SetUp() OVERRIDE {
19 resources_available_ = LoadResources("en-US");
22 virtual void TearDown() OVERRIDE {
23 UnloadResources();
26 bool resources_available_;
29 // TODO(alexeypa): Reenable the test once http://crbug.com/269143 (ChromeOS) and
30 // http://crbug.com/268043 (MacOS) are fixed.
31 TEST_F(ResourcesTest, DISABLED_ProductName) {
32 #if defined(GOOGLE_CHROME_BUILD)
33 std::string expected_product_name = "Chrome Remote Desktop";
34 #else // defined(GOOGLE_CHROME_BUILD)
35 std::string expected_product_name = "Chromoting";
36 #endif // !defined(GOOGLE_CHROME_BUILD)
38 // Chrome-style i18n is not used on Windows.
39 #if defined(OS_WIN)
40 EXPECT_FALSE(resources_available_);
41 #else
42 EXPECT_TRUE(resources_available_);
43 #endif
45 if (resources_available_) {
46 EXPECT_EQ(expected_product_name,
47 l10n_util::GetStringUTF8(IDS_PRODUCT_NAME));
51 } // namespace remoting