diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-07 09:05:12 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-07 09:05:12 +0000 |
commit | 8ee0492feeb4f8b10b965eb0603531acf51fec23 (patch) | |
tree | 0fe3ab210bd80f2664084876454d6e657e52183a /chrome/browser | |
parent | 3ed32b6a198b97b8918123f1c45e224903f0db06 (diff) | |
download | chromium_src-8ee0492feeb4f8b10b965eb0603531acf51fec23.zip chromium_src-8ee0492feeb4f8b10b965eb0603531acf51fec23.tar.gz chromium_src-8ee0492feeb4f8b10b965eb0603531acf51fec23.tar.bz2 |
Make some more code use "if (weak_ptr)" style
This is a revert of r204036 and part of r203996.
BUG=245942
TBR=darin@chromium.org
Review URL: https://chromiumcodereview.appspot.com/16571012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/extensions/extension_action_unittest.cc | 22 | ||||
-rw-r--r-- | chrome/browser/sync/glue/shared_change_processor_unittest.cc | 2 |
2 files changed, 11 insertions, 13 deletions
diff --git a/chrome/browser/extensions/extension_action_unittest.cc b/chrome/browser/extensions/extension_action_unittest.cc index c1868ea..2aba574 100644 --- a/chrome/browser/extensions/extension_action_unittest.cc +++ b/chrome/browser/extensions/extension_action_unittest.cc @@ -45,7 +45,7 @@ TEST(ExtensionActionTest, Visibility) { action.SetAppearance(100, ExtensionAction::ACTIVE); ASSERT_FALSE(action.GetIsVisible(1)); ASSERT_TRUE(action.GetIsVisible(100)); - EXPECT_FALSE(action.GetIconAnimation(100).get()) + EXPECT_FALSE(action.GetIconAnimation(100)) << "Page actions should not animate."; action.ClearAllValuesForTab(100); @@ -63,24 +63,22 @@ TEST(ExtensionActionTest, ScriptBadgeAnimation) { ExtensionAction script_badge( std::string(), ActionInfo::TYPE_SCRIPT_BADGE, ActionInfo()); - EXPECT_FALSE( - script_badge.GetIconAnimation(ExtensionAction::kDefaultTabId).get()); + EXPECT_FALSE(script_badge.GetIconAnimation(ExtensionAction::kDefaultTabId)); script_badge.SetAppearance(ExtensionAction::kDefaultTabId, ExtensionAction::ACTIVE); - EXPECT_FALSE( - script_badge.GetIconAnimation(ExtensionAction::kDefaultTabId).get()) + EXPECT_FALSE(script_badge.GetIconAnimation(ExtensionAction::kDefaultTabId)) << "Showing the default tab should not animate script badges."; script_badge.SetAppearance(ExtensionAction::kDefaultTabId, ExtensionAction::INVISIBLE); - EXPECT_FALSE(script_badge.GetIconAnimation(1).get()) + EXPECT_FALSE(script_badge.GetIconAnimation(1)) << "Making a script badge invisible should not show its animation."; script_badge.SetAppearance(1, ExtensionAction::ACTIVE); - EXPECT_TRUE(script_badge.GetIconAnimation(1).get()) + EXPECT_TRUE(script_badge.GetIconAnimation(1)) << "Making a script badge visible should show its animation."; script_badge.ClearAllValuesForTab(1); - EXPECT_FALSE(script_badge.GetIconAnimation(100).get()); + EXPECT_FALSE(script_badge.GetIconAnimation(100)); } TEST(ExtensionActionTest, GetAttention) { @@ -90,18 +88,18 @@ TEST(ExtensionActionTest, GetAttention) { ExtensionAction script_badge( std::string(), ActionInfo::TYPE_SCRIPT_BADGE, ActionInfo()); EXPECT_FALSE(script_badge.GetIsVisible(1)); - EXPECT_FALSE(script_badge.GetIconAnimation(1).get()); + EXPECT_FALSE(script_badge.GetIconAnimation(1)); script_badge.SetAppearance(1, ExtensionAction::WANTS_ATTENTION); EXPECT_TRUE(script_badge.GetIsVisible(1)); - EXPECT_TRUE(script_badge.GetIconAnimation(1).get()); + EXPECT_TRUE(script_badge.GetIconAnimation(1)); // Simulate waiting long enough for the animation to end. message_loop.reset(); // Can't have 2 MessageLoops alive at once. message_loop.reset(new base::MessageLoop); - EXPECT_FALSE(script_badge.GetIconAnimation(1).get()); // Sanity check. + EXPECT_FALSE(script_badge.GetIconAnimation(1)); // Sanity check. script_badge.SetAppearance(1, ExtensionAction::ACTIVE); - EXPECT_FALSE(script_badge.GetIconAnimation(1).get()) + EXPECT_FALSE(script_badge.GetIconAnimation(1)) << "The animation should not play again if the icon was already visible."; } diff --git a/chrome/browser/sync/glue/shared_change_processor_unittest.cc b/chrome/browser/sync/glue/shared_change_processor_unittest.cc index 30137e9..795d738 100644 --- a/chrome/browser/sync/glue/shared_change_processor_unittest.cc +++ b/chrome/browser/sync/glue/shared_change_processor_unittest.cc @@ -109,7 +109,7 @@ class SyncSharedChangeProcessorTest : public testing::Test { &sync_service_, &error_handler_, syncer::AUTOFILL, - base::WeakPtr<syncer::SyncMergeResult>()).get()); + base::WeakPtr<syncer::SyncMergeResult>())); } base::MessageLoopForUI ui_loop_; |