blob: 94397628066cd0dc85a827df2b89e2e8ebef7a0a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "remoting/host/resources.h"
#include "build/build_config.h"
#include "remoting/base/string_resources.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/l10n/l10n_util.h"
namespace remoting {
class ResourcesTest : public testing::Test {
protected:
ResourcesTest() : resources_available_(false) {}
void SetUp() override { resources_available_ = LoadResources("en-US"); }
void TearDown() override { UnloadResources(); }
bool resources_available_;
};
// TODO(alexeypa): Reenable the test once http://crbug.com/269143 (ChromeOS) and
// http://crbug.com/268043 (MacOS) are fixed.
TEST_F(ResourcesTest, DISABLED_ProductName) {
#if defined(GOOGLE_CHROME_BUILD)
std::string expected_product_name = "Chrome Remote Desktop";
#else // defined(GOOGLE_CHROME_BUILD)
std::string expected_product_name = "Chromoting";
#endif // !defined(GOOGLE_CHROME_BUILD)
// Chrome-style i18n is not used on Windows.
#if defined(OS_WIN)
EXPECT_FALSE(resources_available_);
#else
EXPECT_TRUE(resources_available_);
#endif
if (resources_available_) {
EXPECT_EQ(expected_product_name,
l10n_util::GetStringUTF8(IDS_PRODUCT_NAME));
}
}
} // namespace remoting
|