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

Side by Side Diff: chrome/browser/extensions/api/extension_action/browser_action_browsertest.cc

Issue 501263002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/extensions/api/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just in case Created 6 years, 3 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
OLDNEW
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 "base/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "chrome/browser/extensions/extension_action.h" 7 #include "chrome/browser/extensions/extension_action.h"
8 #include "chrome/browser/extensions/extension_action_manager.h" 8 #include "chrome/browser/extensions/extension_action_manager.h"
9 #include "chrome/browser/extensions/extension_browsertest.h" 9 #include "chrome/browser/extensions/extension_browsertest.h"
10 #include "chrome/browser/extensions/extension_test_message_listener.h" 10 #include "chrome/browser/extensions/extension_test_message_listener.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, BrowserActionDefaultPersistence) { 76 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, BrowserActionDefaultPersistence) {
77 // Find the extension (it's a shame we don't have an ID for this, but it 77 // Find the extension (it's a shame we don't have an ID for this, but it
78 // was generated in the last test). 78 // was generated in the last test).
79 const Extension* extension = NULL; 79 const Extension* extension = NULL;
80 const ExtensionSet& extension_set = 80 const ExtensionSet& extension_set =
81 ExtensionRegistry::Get(profile())->enabled_extensions(); 81 ExtensionRegistry::Get(profile())->enabled_extensions();
82 for (ExtensionSet::const_iterator iter = extension_set.begin(); 82 for (ExtensionSet::const_iterator iter = extension_set.begin();
83 iter != extension_set.end(); 83 iter != extension_set.end();
84 ++iter) { 84 ++iter) {
85 if ((*iter)->name() == kExtensionName) { 85 if ((*iter)->name() == kExtensionName) {
86 extension = *iter; 86 extension = iter->get();
87 break; 87 break;
88 } 88 }
89 } 89 }
90 ASSERT_TRUE(extension) << "Could not find extension in registry."; 90 ASSERT_TRUE(extension) << "Could not find extension in registry.";
91 91
92 ExtensionAction* extension_action = 92 ExtensionAction* extension_action =
93 ExtensionActionManager::Get(profile())->GetBrowserAction(*extension); 93 ExtensionActionManager::Get(profile())->GetBrowserAction(*extension);
94 ASSERT_TRUE(extension_action); 94 ASSERT_TRUE(extension_action);
95 95
96 // If the extension hasn't already set the badge text, then we should wait for 96 // If the extension hasn't already set the badge text, then we should wait for
(...skipping 11 matching lines...) Expand all
108 LOG(WARNING) << "State store already initialized; test guaranteed to pass."; 108 LOG(WARNING) << "State store already initialized; test guaranteed to pass.";
109 109
110 // Wait for the StateStore to load, and fetch the defaults. 110 // Wait for the StateStore to load, and fetch the defaults.
111 WaitForStateStore(profile(), extension->id()); 111 WaitForStateStore(profile(), extension->id());
112 112
113 // Ensure the BrowserAction's badge background is still blue. 113 // Ensure the BrowserAction's badge background is still blue.
114 EXPECT_EQ(SK_ColorBLUE, extension_action->GetBadgeBackgroundColor(0)); 114 EXPECT_EQ(SK_ColorBLUE, extension_action->GetBadgeBackgroundColor(0));
115 } 115 }
116 116
117 } // namespace extensions 117 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698