OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/macros.h" | 5 #include "base/macros.h" |
6 #include "chrome/browser/extensions/extension_browsertest.h" | 6 #include "chrome/browser/extensions/extension_browsertest.h" |
7 #include "chrome/browser/extensions/extension_toolbar_model.h" | 7 #include "chrome/browser/extensions/extension_toolbar_model.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 highlight_mode_count_ = 0; | 25 highlight_mode_count_ = 0; |
26 | 26 |
27 ExtensionBrowserTest::SetUp(); | 27 ExtensionBrowserTest::SetUp(); |
28 } | 28 } |
29 | 29 |
30 virtual void SetUpOnMainThread() OVERRIDE { | 30 virtual void SetUpOnMainThread() OVERRIDE { |
31 model_ = ExtensionToolbarModel::Get(browser()->profile()); | 31 model_ = ExtensionToolbarModel::Get(browser()->profile()); |
32 model_->AddObserver(this); | 32 model_->AddObserver(this); |
33 } | 33 } |
34 | 34 |
35 virtual void CleanUpOnMainThread() OVERRIDE { | 35 virtual void TearDownOnMainThread() OVERRIDE { |
36 model_->RemoveObserver(this); | 36 model_->RemoveObserver(this); |
37 } | 37 } |
38 | 38 |
39 virtual void BrowserActionAdded(const Extension* extension, | 39 virtual void BrowserActionAdded(const Extension* extension, |
40 int index) OVERRIDE { | 40 int index) OVERRIDE { |
41 inserted_count_++; | 41 inserted_count_++; |
42 } | 42 } |
43 | 43 |
44 virtual void BrowserActionRemoved(const Extension* extension) OVERRIDE { | 44 virtual void BrowserActionRemoved(const Extension* extension) OVERRIDE { |
45 removed_count_++; | 45 removed_count_++; |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 // Should be at max size (-1). | 602 // Should be at max size (-1). |
603 EXPECT_EQ(-1, model_->GetVisibleIconCount()); | 603 EXPECT_EQ(-1, model_->GetVisibleIconCount()); |
604 | 604 |
605 model_->OnExtensionToolbarPrefChange(); | 605 model_->OnExtensionToolbarPrefChange(); |
606 | 606 |
607 // Should still be at max size. | 607 // Should still be at max size. |
608 EXPECT_EQ(-1, model_->GetVisibleIconCount()); | 608 EXPECT_EQ(-1, model_->GetVisibleIconCount()); |
609 } | 609 } |
610 | 610 |
611 } // namespace extensions | 611 } // namespace extensions |
OLD | NEW |