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

Side by Side Diff: chrome/browser/extensions/script_bubble_controller_unittest.cc

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 (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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 scoped_refptr<const Extension> extension2 = 87 scoped_refptr<const Extension> extension2 =
88 ExtensionBuilder() 88 ExtensionBuilder()
89 .SetPath(root.AppendASCII("f2")) 89 .SetPath(root.AppendASCII("f2"))
90 .SetManifest(DictionaryBuilder() 90 .SetManifest(DictionaryBuilder()
91 .Set("name", "ex2") 91 .Set("name", "ex2")
92 .Set("version", "1") 92 .Set("version", "1")
93 .Set("manifest_version", 2)) 93 .Set("manifest_version", 2))
94 .Build(); 94 .Build();
95 95
96 extension_service_->AddExtension(extension1); 96 extension_service_->AddExtension(extension1.get());
97 extension_service_->AddExtension(extension2); 97 extension_service_->AddExtension(extension2.get());
98 98
99 const Extension* script_bubble = 99 const Extension* script_bubble =
100 extension_service_->component_loader()->GetScriptBubble(); 100 extension_service_->component_loader()->GetScriptBubble();
101 ExtensionAction* script_bubble_action = 101 ExtensionAction* script_bubble_action =
102 ExtensionActionManager::Get(profile())->GetPageAction(*script_bubble); 102 ExtensionActionManager::Get(profile())->GetPageAction(*script_bubble);
103 ASSERT_TRUE(script_bubble_action); 103 ASSERT_TRUE(script_bubble_action);
104 104
105 // By default, the bubble should be invisible. 105 // By default, the bubble should be invisible.
106 NavigateAndCommit(GURL("http://www.google.com")); 106 NavigateAndCommit(GURL("http://www.google.com"));
107 EXPECT_FALSE(script_bubble_action->GetIsVisible(tab_id())); 107 EXPECT_FALSE(script_bubble_action->GetIsVisible(tab_id()));
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 // Navigating away resets the badge. 154 // Navigating away resets the badge.
155 NavigateAndCommit(GURL("http://www.google.com")); 155 NavigateAndCommit(GURL("http://www.google.com"));
156 EXPECT_FALSE(script_bubble_action->GetIsVisible(tab_id())); 156 EXPECT_FALSE(script_bubble_action->GetIsVisible(tab_id()));
157 EXPECT_EQ("", script_bubble_action->GetBadgeText(tab_id())); 157 EXPECT_EQ("", script_bubble_action->GetBadgeText(tab_id()));
158 EXPECT_EQ(GURL(), script_bubble_action->GetPopupUrl(tab_id())); 158 EXPECT_EQ(GURL(), script_bubble_action->GetPopupUrl(tab_id()));
159 }; 159 };
160 160
161 } // namespace 161 } // namespace
162 } // namespace extensions 162 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/script_badge_controller_unittest.cc ('k') | chrome/browser/extensions/user_script_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698