Hook the WebThreadImplForMessageLoop up to post taks through the blink
[chromium-blink-merge.git] / remoting / base / resources_unittest.cc
bloba684b2c089a556a736f4c44174fbe12f35884675
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 void SetUp() override { resources_available_ = LoadResources("en-US"); }
20 void TearDown() override { UnloadResources(); }
22 bool resources_available_;
25 // TODO(alexeypa): Reenable the test once http://crbug.com/269143 (ChromeOS) and
26 // http://crbug.com/268043 (MacOS) are fixed.
27 TEST_F(ResourcesTest, DISABLED_ProductName) {
28 #if defined(GOOGLE_CHROME_BUILD)
29 std::string expected_product_name = "Chrome Remote Desktop";
30 #else // defined(GOOGLE_CHROME_BUILD)
31 std::string expected_product_name = "Chromoting";
32 #endif // !defined(GOOGLE_CHROME_BUILD)
34 // Chrome-style i18n is not used on Windows.
35 #if defined(OS_WIN)
36 EXPECT_FALSE(resources_available_);
37 #else
38 EXPECT_TRUE(resources_available_);
39 #endif
41 if (resources_available_) {
42 EXPECT_EQ(expected_product_name,
43 l10n_util::GetStringUTF8(IDS_PRODUCT_NAME));
47 } // namespace remoting