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

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

Issue 12212047: Linux/ChromeOS Chromium style checker cleanup, chrome/browser/extensions edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
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/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 private: 469 private:
470 DISALLOW_COPY_AND_ASSIGN(MockEventRouter); 470 DISALLOW_COPY_AND_ASSIGN(MockEventRouter);
471 }; 471 };
472 472
473 // A mock ExtensionSystem to serve our MockEventRouter. 473 // A mock ExtensionSystem to serve our MockEventRouter.
474 class MockExtensionSystem : public TestExtensionSystem { 474 class MockExtensionSystem : public TestExtensionSystem {
475 public: 475 public:
476 explicit MockExtensionSystem(Profile* profile) 476 explicit MockExtensionSystem(Profile* profile)
477 : TestExtensionSystem(profile) {} 477 : TestExtensionSystem(profile) {}
478 478
479 virtual EventRouter* event_router() { 479 virtual EventRouter* event_router() OVERRIDE {
480 if (!mock_event_router_.get()) 480 if (!mock_event_router_.get())
481 mock_event_router_.reset(new MockEventRouter(profile_)); 481 mock_event_router_.reset(new MockEventRouter(profile_));
482 return mock_event_router_.get(); 482 return mock_event_router_.get();
483 } 483 }
484 484
485 private: 485 private:
486 scoped_ptr<MockEventRouter> mock_event_router_; 486 scoped_ptr<MockEventRouter> mock_event_router_;
487 487
488 DISALLOW_COPY_AND_ASSIGN(MockExtensionSystem); 488 DISALLOW_COPY_AND_ASSIGN(MockExtensionSystem);
489 }; 489 };
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 EXPECT_EQ(4u, manager_.MenuItems(extension1->id())->size()); 746 EXPECT_EQ(4u, manager_.MenuItems(extension1->id())->size());
747 EXPECT_EQ(1u, manager_.MenuItems(extension2->id())->size()); 747 EXPECT_EQ(1u, manager_.MenuItems(extension2->id())->size());
748 748
749 // Remove all context menu items with incognito true. 749 // Remove all context menu items with incognito true.
750 manager_.RemoveAllIncognitoContextItems(); 750 manager_.RemoveAllIncognitoContextItems();
751 EXPECT_EQ(2u, manager_.MenuItems(extension1->id())->size()); 751 EXPECT_EQ(2u, manager_.MenuItems(extension1->id())->size());
752 EXPECT_EQ(1u, manager_.MenuItems(extension2->id())->size()); 752 EXPECT_EQ(1u, manager_.MenuItems(extension2->id())->size());
753 } 753 }
754 754
755 } // namespace extensions 755 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/management_policy_unittest.cc ('k') | chrome/browser/extensions/permissions_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698