Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Side by Side Diff: chrome/common/extensions/extension_action_unittest.cc

Issue 10986043: Update another local variable reference that wasn't present on trunk. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1229/src/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "chrome/common/chrome_paths.h" 9 #include "chrome/common/chrome_paths.h"
10 #include "chrome/common/extensions/extension_action.h" 10 #include "chrome/common/extensions/extension_action.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 MessageLoop message_loop; 163 MessageLoop message_loop;
164 164
165 ExtensionAction script_badge("", ExtensionAction::TYPE_SCRIPT_BADGE); 165 ExtensionAction script_badge("", ExtensionAction::TYPE_SCRIPT_BADGE);
166 EXPECT_FALSE(script_badge.GetIsVisible(1)); 166 EXPECT_FALSE(script_badge.GetIsVisible(1));
167 EXPECT_FALSE(script_badge.GetIconAnimation(1)); 167 EXPECT_FALSE(script_badge.GetIconAnimation(1));
168 script_badge.SetAppearance(1, ExtensionAction::WANTS_ATTENTION); 168 script_badge.SetAppearance(1, ExtensionAction::WANTS_ATTENTION);
169 EXPECT_TRUE(script_badge.GetIsVisible(1)); 169 EXPECT_TRUE(script_badge.GetIsVisible(1));
170 EXPECT_TRUE(script_badge.GetIconAnimation(1)); 170 EXPECT_TRUE(script_badge.GetIconAnimation(1));
171 171
172 // Simulate waiting long enough for the animation to end. 172 // Simulate waiting long enough for the animation to end.
173 action.GetIconAnimation(1)->Stop(); 173 script_badge.GetIconAnimation(1)->Stop();
174 EXPECT_FALSE(script_badge.GetIconAnimation(1)); // Sanity check. 174 EXPECT_FALSE(script_badge.GetIconAnimation(1)); // Sanity check.
175 175
176 script_badge.SetAppearance(1, ExtensionAction::ACTIVE); 176 script_badge.SetAppearance(1, ExtensionAction::ACTIVE);
177 EXPECT_FALSE(script_badge.GetIconAnimation(1)) 177 EXPECT_FALSE(script_badge.GetIconAnimation(1))
178 << "The animation should not play again if the icon was already visible."; 178 << "The animation should not play again if the icon was already visible.";
179 179
180 message_loop.RunAllPending(); 180 message_loop.RunAllPending();
181 } 181 }
182 182
183 TEST_F(ExtensionActionTest, Badge) { 183 TEST_F(ExtensionActionTest, Badge) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 action.SetPopupUrl(ExtensionAction::kDefaultTabId, url_baz); 246 action.SetPopupUrl(ExtensionAction::kDefaultTabId, url_baz);
247 ASSERT_EQ(url_baz, action.GetPopupUrl(1)); 247 ASSERT_EQ(url_baz, action.GetPopupUrl(1));
248 ASSERT_EQ(url_bar, action.GetPopupUrl(100)); 248 ASSERT_EQ(url_bar, action.GetPopupUrl(100));
249 249
250 action.ClearAllValuesForTab(100); 250 action.ClearAllValuesForTab(100);
251 ASSERT_EQ(url_baz, action.GetPopupUrl(1)); 251 ASSERT_EQ(url_baz, action.GetPopupUrl(1));
252 ASSERT_EQ(url_baz, action.GetPopupUrl(100)); 252 ASSERT_EQ(url_baz, action.GetPopupUrl(100));
253 } 253 }
254 254
255 } // namespace 255 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698