OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/ui/idle_app_name_notification_view.h" | 5 #include "chrome/browser/chromeos/ui/idle_app_name_notification_view.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/test_extension_system.h" | 10 #include "chrome/browser/extensions/test_extension_system.h" |
11 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
| 12 #include "chrome/grit/generated_resources.h" |
12 #include "chrome/test/base/browser_with_test_window_test.h" | 13 #include "chrome/test/base/browser_with_test_window_test.h" |
13 #include "extensions/common/manifest_constants.h" | 14 #include "extensions/common/manifest_constants.h" |
14 #include "grit/generated_resources.h" | |
15 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 const char kTestAppName[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; | 18 const char kTestAppName[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; |
19 } // namespace | 19 } // namespace |
20 | 20 |
21 class IdleAppNameNotificationViewTest : public BrowserWithTestWindowTest { | 21 class IdleAppNameNotificationViewTest : public BrowserWithTestWindowTest { |
22 public: | 22 public: |
23 IdleAppNameNotificationViewTest() | 23 IdleAppNameNotificationViewTest() |
24 : BrowserWithTestWindowTest( | 24 : BrowserWithTestWindowTest( |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // Check that an invalid app gets shown accordingly. | 119 // Check that an invalid app gets shown accordingly. |
120 TEST_F(IdleAppNameNotificationViewTest, CheckInvalidApp) { | 120 TEST_F(IdleAppNameNotificationViewTest, CheckInvalidApp) { |
121 // Create a message which is visible for 10ms and fades in/out for 5ms. | 121 // Create a message which is visible for 10ms and fades in/out for 5ms. |
122 scoped_ptr<chromeos::IdleAppNameNotificationView> message( | 122 scoped_ptr<chromeos::IdleAppNameNotificationView> message( |
123 new chromeos::IdleAppNameNotificationView(10, 5, NULL)); | 123 new chromeos::IdleAppNameNotificationView(10, 5, NULL)); |
124 base::string16 text = message->GetShownTextForTest(); | 124 base::string16 text = message->GetShownTextForTest(); |
125 base::string16 error = l10n_util::GetStringUTF16( | 125 base::string16 error = l10n_util::GetStringUTF16( |
126 IDS_IDLE_APP_NAME_UNKNOWN_APPLICATION_NOTIFICATION); | 126 IDS_IDLE_APP_NAME_UNKNOWN_APPLICATION_NOTIFICATION); |
127 EXPECT_EQ(error, text); | 127 EXPECT_EQ(error, text); |
128 } | 128 } |
OLD | NEW |