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/macros.h" |
8 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/test_extension_system.h" | 11 #include "chrome/browser/extensions/test_extension_system.h" |
11 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
12 #include "chrome/grit/generated_resources.h" | 13 #include "chrome/grit/generated_resources.h" |
13 #include "chrome/test/base/browser_with_test_window_test.h" | 14 #include "chrome/test/base/browser_with_test_window_test.h" |
14 #include "extensions/common/manifest_constants.h" | 15 #include "extensions/common/manifest_constants.h" |
15 #include "ui/base/l10n/l10n_util.h" | 16 #include "ui/base/l10n/l10n_util.h" |
16 | 17 |
17 namespace { | 18 namespace { |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // Check that an invalid app gets shown accordingly. | 123 // Check that an invalid app gets shown accordingly. |
123 TEST_F(IdleAppNameNotificationViewTest, CheckInvalidApp) { | 124 TEST_F(IdleAppNameNotificationViewTest, CheckInvalidApp) { |
124 // Create a message which is visible for 10ms and fades in/out for 5ms. | 125 // Create a message which is visible for 10ms and fades in/out for 5ms. |
125 scoped_ptr<chromeos::IdleAppNameNotificationView> message( | 126 scoped_ptr<chromeos::IdleAppNameNotificationView> message( |
126 new chromeos::IdleAppNameNotificationView(10, 5, NULL)); | 127 new chromeos::IdleAppNameNotificationView(10, 5, NULL)); |
127 base::string16 text = message->GetShownTextForTest(); | 128 base::string16 text = message->GetShownTextForTest(); |
128 base::string16 error = l10n_util::GetStringUTF16( | 129 base::string16 error = l10n_util::GetStringUTF16( |
129 IDS_IDLE_APP_NAME_UNKNOWN_APPLICATION_NOTIFICATION); | 130 IDS_IDLE_APP_NAME_UNKNOWN_APPLICATION_NOTIFICATION); |
130 EXPECT_EQ(error, text); | 131 EXPECT_EQ(error, text); |
131 } | 132 } |
OLD | NEW |