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

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

Issue 10704023: Moved ExtensionPrefs and related into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 (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 <vector> 5 #include <vector>
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 72 }
73 73
74 protected: 74 protected:
75 TestingProfile profile_; 75 TestingProfile profile_;
76 MessageLoopForUI message_loop_; 76 MessageLoopForUI message_loop_;
77 content::TestBrowserThread ui_thread_; 77 content::TestBrowserThread ui_thread_;
78 content::TestBrowserThread file_thread_; 78 content::TestBrowserThread file_thread_;
79 79
80 ExtensionMenuManager manager_; 80 ExtensionMenuManager manager_;
81 extensions::ExtensionList extensions_; 81 extensions::ExtensionList extensions_;
82 TestExtensionPrefs prefs_; 82 extensions::TestExtensionPrefs prefs_;
83 int next_id_; 83 int next_id_;
84 84
85 private: 85 private:
86 DISALLOW_COPY_AND_ASSIGN(ExtensionMenuManagerTest); 86 DISALLOW_COPY_AND_ASSIGN(ExtensionMenuManagerTest);
87 }; 87 };
88 88
89 // Tests adding, getting, and removing items. 89 // Tests adding, getting, and removing items.
90 TEST_F(ExtensionMenuManagerTest, AddGetRemoveItems) { 90 TEST_F(ExtensionMenuManagerTest, AddGetRemoveItems) {
91 Extension* extension = AddExtension("test"); 91 Extension* extension = AddExtension("test");
92 92
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 manager_.ChangeParent(child1->id(), NULL); 620 manager_.ChangeParent(child1->id(), NULL);
621 ASSERT_TRUE(new_item->checked()); 621 ASSERT_TRUE(new_item->checked());
622 ASSERT_TRUE(child1->checked()); 622 ASSERT_TRUE(child1->checked());
623 623
624 // Removing |parent| should cause only |child1| to be selected. 624 // Removing |parent| should cause only |child1| to be selected.
625 manager_.RemoveContextMenuItem(parent->id()); 625 manager_.RemoveContextMenuItem(parent->id());
626 parent = NULL; 626 parent = NULL;
627 ASSERT_FALSE(new_item->checked()); 627 ASSERT_FALSE(new_item->checked());
628 ASSERT_TRUE(child1->checked()); 628 ASSERT_TRUE(child1->checked());
629 } 629 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698