OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/scoped_temp_dir.h" | 7 #include "base/scoped_temp_dir.h" |
8 #include "base/stl_util-inl.h" | 8 #include "base/stl_util-inl.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "chrome/browser/chrome_thread.h" | 10 #include "chrome/browser/chrome_thread.h" |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 extension_id_overridden_off_)); | 338 extension_id_overridden_off_)); |
339 } | 339 } |
340 | 340 |
341 private: | 341 private: |
342 // The ids of our three test extensions. | 342 // The ids of our three test extensions. |
343 std::string extension_id_default_; | 343 std::string extension_id_default_; |
344 std::string extension_id_overridden_on_; | 344 std::string extension_id_overridden_on_; |
345 std::string extension_id_overridden_off_; | 345 std::string extension_id_overridden_off_; |
346 }; | 346 }; |
347 TEST_F(ExtensionPrefsAppToolbars, ExtensionPrefsAppToolbars) {} | 347 TEST_F(ExtensionPrefsAppToolbars, ExtensionPrefsAppToolbars) {} |
| 348 |
| 349 class ExtensionPrefsOnExtensionInstalled : public ExtensionPrefsTest { |
| 350 public: |
| 351 virtual void Initialize() { |
| 352 extension_.reset(prefs_.AddExtension("on_extension_installed")); |
| 353 EXPECT_EQ(Extension::ENABLED, |
| 354 prefs()->GetExtensionState(extension_->id())); |
| 355 EXPECT_FALSE(prefs()->IsIncognitoEnabled(extension_->id())); |
| 356 prefs()->OnExtensionInstalled(extension_.get(), |
| 357 Extension::DISABLED, true); |
| 358 } |
| 359 |
| 360 virtual void Verify() { |
| 361 EXPECT_EQ(Extension::DISABLED, |
| 362 prefs()->GetExtensionState(extension_->id())); |
| 363 EXPECT_TRUE(prefs()->IsIncognitoEnabled(extension_->id())); |
| 364 } |
| 365 |
| 366 private: |
| 367 scoped_ptr<Extension> extension_; |
| 368 }; |
| 369 TEST_F(ExtensionPrefsOnExtensionInstalled, |
| 370 ExtensionPrefsOnExtensionInstalled) {} |
OLD | NEW |