| Index: remoting/base/resources_unittest.cc
|
| diff --git a/remoting/base/resources_unittest.cc b/remoting/base/resources_unittest.cc
|
| index 45f94eef48c7aaefcc70f6a15e877ec5101a5ce8..aa94ec3f9506786fd9a69fed4edb6cffc47be41e 100644
|
| --- a/remoting/base/resources_unittest.cc
|
| +++ b/remoting/base/resources_unittest.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "remoting/base/resources.h"
|
|
|
| +#include "remoting/base/common_resources.h"
|
| #include "remoting/base/string_resources.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| @@ -15,19 +16,37 @@ namespace remoting {
|
| // the test.
|
| #if !defined(OS_MACOSX)
|
| #define MAYBE_ProductName ProductName
|
| +#define MAYBE_ProductLogo ProductLogo
|
| #else // !defined(OS_MACOSX)
|
| #define MAYBE_ProductName DISABLED_ProductName
|
| +#define MAYBE_ProductLogo DISABLED_ProductLogo
|
| #endif // defined(OS_MACOSX)
|
| -TEST(Resources, MAYBE_ProductName) {
|
| +
|
| +class ResourcesTest : public testing::Test {
|
| + protected:
|
| + void SetUp() OVERRIDE {
|
| + ASSERT_TRUE(LoadResources("en-US"));
|
| + }
|
| +
|
| + void TearDown() OVERRIDE {
|
| + ui::ResourceBundle::CleanupSharedInstance();
|
| + }
|
| +};
|
| +
|
| +TEST_F(ResourcesTest, MAYBE_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)
|
| - ASSERT_TRUE(LoadResources("en-US"));
|
| EXPECT_EQ(expected_product_name,
|
| l10n_util::GetStringUTF8(IDR_REMOTING_PRODUCT_NAME));
|
| - ui::ResourceBundle::CleanupSharedInstance();
|
| +}
|
| +
|
| +TEST_F(ResourcesTest, MAYBE_ProductLogo) {
|
| + gfx::Image logo = ui::ResourceBundle::GetSharedInstance().GetImageNamed(
|
| + IDR_PRODUCT_LOGO_16);
|
| + EXPECT_FALSE(logo.IsEmpty());
|
| }
|
|
|
| } // namespace remoting
|
|
|