| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" | 10 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" |
| 11 #include "chrome/browser/extensions/extension_prefs_unittest.h" | 11 #include "chrome/browser/extensions/extension_prefs_unittest.h" |
| 12 #include "extensions/common/extension.h" | 12 #include "extensions/common/extension.h" |
| 13 | 13 |
| 14 namespace extensions { | 14 namespace extensions { |
| 15 | 15 |
| 16 // Tests force hiding browser actions. | 16 // Tests force hiding browser actions. |
| 17 class ExtensionPrefsHidingBrowserActions : public ExtensionPrefsTest { | 17 class ExtensionPrefsHidingBrowserActions : public ExtensionPrefsTest { |
| 18 public: | 18 public: |
| 19 ExtensionPrefsHidingBrowserActions() : ExtensionPrefsTest(NULL) {} |
| 20 |
| 19 virtual void Initialize() OVERRIDE { | 21 virtual void Initialize() OVERRIDE { |
| 20 // Install 5 extensions. | 22 // Install 5 extensions. |
| 21 for (int i = 0; i < 5; i++) { | 23 for (int i = 0; i < 5; i++) { |
| 22 std::string name = "test" + base::IntToString(i); | 24 std::string name = "test" + base::IntToString(i); |
| 23 extensions_.push_back(prefs_.AddExtension(name)); | 25 extensions_.push_back(prefs_.AddExtension(name)); |
| 24 } | 26 } |
| 25 | 27 |
| 26 ExtensionList::const_iterator iter; | 28 ExtensionList::const_iterator iter; |
| 27 for (iter = extensions_.begin(); iter != extensions_.end(); ++iter) { | 29 for (iter = extensions_.begin(); iter != extensions_.end(); ++iter) { |
| 28 EXPECT_TRUE(ExtensionActionAPI::GetBrowserActionVisibility( | 30 EXPECT_TRUE(ExtensionActionAPI::GetBrowserActionVisibility( |
| (...skipping 21 matching lines...) Expand all Loading... |
| 50 } | 52 } |
| 51 } | 53 } |
| 52 | 54 |
| 53 private: | 55 private: |
| 54 ExtensionList extensions_; | 56 ExtensionList extensions_; |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 TEST_F(ExtensionPrefsHidingBrowserActions, ForceHide) {} | 59 TEST_F(ExtensionPrefsHidingBrowserActions, ForceHide) {} |
| 58 | 60 |
| 59 } // namespace extensions | 61 } // namespace extensions |
| OLD | NEW |