Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / remoting / host / resources_unittest.cc
blob8ce89cd6f1dc5586d375efe9f01bbfbc61c0226d
1 // Copyright 2015 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/host/resources.h"
7 #include "remoting/base/string_resources.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "ui/base/l10n/l10n_util.h"
11 namespace remoting {
13 class ResourcesTest : public testing::Test {
14 protected:
15 ResourcesTest() : resources_available_(false) {}
17 void SetUp() override { resources_available_ = LoadResources("en-US"); }
19 void TearDown() override { UnloadResources(); }
21 bool resources_available_;
24 // TODO(alexeypa): Reenable the test once http://crbug.com/269143 (ChromeOS) and
25 // http://crbug.com/268043 (MacOS) are fixed.
26 TEST_F(ResourcesTest, DISABLED_ProductName) {
27 #if defined(GOOGLE_CHROME_BUILD)
28 std::string expected_product_name = "Chrome Remote Desktop";
29 #else // defined(GOOGLE_CHROME_BUILD)
30 std::string expected_product_name = "Chromoting";
31 #endif // !defined(GOOGLE_CHROME_BUILD)
33 // Chrome-style i18n is not used on Windows.
34 #if defined(OS_WIN)
35 EXPECT_FALSE(resources_available_);
36 #else
37 EXPECT_TRUE(resources_available_);
38 #endif
40 if (resources_available_) {
41 EXPECT_EQ(expected_product_name,
42 l10n_util::GetStringUTF8(IDS_PRODUCT_NAME));
46 } // namespace remoting