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. 4 5 #include "remoting/base/resources.h" 6 7 #include "remoting/base/string_resources.h" 8 #include "ui/base/l10n/l10n_util.h" 9 #include "testing/gtest/include/gtest/gtest.h" 10 11 namespace remoting { 12 13 class ResourcesTest : public testing::Test { 14 protected: 15 ResourcesTest(): resources_available_(false) { 16 } 17 18 virtual void SetUp() OVERRIDE { 19 resources_available_ = LoadResources("en-US"); 20 } 21 22 virtual void TearDown() OVERRIDE { 23 UnloadResources(); 24 } 25 26 bool resources_available_; 27 }; 28 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) 37 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 44 45 if (resources_available_) { 46 EXPECT_EQ(expected_product_name, 47 l10n_util::GetStringUTF8(IDR_PRODUCT_NAME)); 48 } 49 } 50 51 } // namespace remoting 52