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

Unified Diff: chrome/browser/extensions/location_bar_controller_unittest.cc

Issue 508563003: Remove PageActionsController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/location_bar_controller_unittest.cc
diff --git a/chrome/browser/extensions/page_action_controller_unittest.cc b/chrome/browser/extensions/location_bar_controller_unittest.cc
similarity index 88%
rename from chrome/browser/extensions/page_action_controller_unittest.cc
rename to chrome/browser/extensions/location_bar_controller_unittest.cc
index 032cc3a19940139bc3bf822244b93091bde51c73..9f2a6c878bed055e09e94cb136b2b7f20b290daa 100644
--- a/chrome/browser/extensions/page_action_controller_unittest.cc
+++ b/chrome/browser/extensions/location_bar_controller_unittest.cc
@@ -10,7 +10,6 @@
#include "chrome/browser/extensions/extension_action.h"
#include "chrome/browser/extensions/extension_action_manager.h"
#include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/extensions/page_action_controller.h"
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/extensions/test_extension_system.h"
#include "chrome/browser/sessions/session_tab_helper.h"
@@ -29,7 +28,7 @@
namespace extensions {
namespace {
-class PageActionControllerTest : public ChromeRenderViewHostTestHarness {
+class LocationBarControllerUnitTest : public ChromeRenderViewHostTestHarness {
protected:
virtual void SetUp() OVERRIDE {
ChromeRenderViewHostTestHarness::SetUp();
@@ -37,7 +36,7 @@ class PageActionControllerTest : public ChromeRenderViewHostTestHarness {
test_user_manager_.reset(new chromeos::ScopedTestUserManager());
#endif
TabHelper::CreateForWebContents(web_contents());
- // Create an ExtensionService so the PageActionController can find its
+ // Create an ExtensionService so the LocationBarController can find its
// extensions.
CommandLine command_line(CommandLine::NO_PROGRAM);
Profile* profile =
@@ -68,7 +67,8 @@ class PageActionControllerTest : public ChromeRenderViewHostTestHarness {
#endif
};
-TEST_F(PageActionControllerTest, NavigationClearsState) {
+// Test that navigating clears all state in a page action.
+TEST_F(LocationBarControllerUnitTest, NavigationClearsState) {
scoped_refptr<const Extension> extension =
ExtensionBuilder()
.SetManifest(DictionaryBuilder()
@@ -108,5 +108,10 @@ TEST_F(PageActionControllerTest, NavigationClearsState) {
EXPECT_EQ(GURL(), page_action.GetPopupUrl(tab_id()));
};
+// TODO(devlin): We should really have more tests for this.
+// NavigationClearsState doesn't test at all that the LocationBarController
+// actually *returns* the proper PageActions in GetCurrentActions. Do we do
+// this elsewhere?
Finnur 2014/08/27 16:00:15 Not sure. Probably not.
+
} // namespace
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/location_bar_controller.cc ('k') | chrome/browser/extensions/page_action_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698