| 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 "chrome/browser/extensions/extension_browsertest.h" | 5 #include "chrome/browser/extensions/extension_browsertest.h" |
| 6 #include "chrome/browser/extensions/extensions_service.h" | 6 #include "chrome/browser/extensions/extensions_service.h" |
| 7 #include "chrome/browser/extensions/extension_toolbar_model.h" | 7 #include "chrome/browser/extensions/extension_toolbar_model.h" |
| 8 #include "chrome/browser/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/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| 11 #include "chrome/test/in_process_browser_test.h" | 11 #include "chrome/test/in_process_browser_test.h" |
| 12 | 12 |
| 13 // An InProcessBrowserTest for testing the ExtensionToolbarModel. | 13 // An InProcessBrowserTest for testing the ExtensionToolbarModel. |
| 14 // TODO(erikkay) It's unfortunate that this needs to be an in-proc browser test. | 14 // TODO(erikkay) It's unfortunate that this needs to be an in-proc browser test. |
| 15 // It would be nice to refactor things so that ExtensionsService could run | 15 // It would be nice to refactor things so that ExtensionsService could run |
| 16 // without so much of the browser in place. | 16 // without so much of the browser in place. |
| 17 class ExtensionToolbarModelTest : public ExtensionBrowserTest, | 17 class ExtensionToolbarModelTest : public ExtensionBrowserTest, |
| 18 public ExtensionToolbarModel::Observer { | 18 public ExtensionToolbarModel::Observer { |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 | 221 |
| 222 // Load extension C again. | 222 // Load extension C again. |
| 223 ASSERT_TRUE(LoadExtension(extension_c_path)); | 223 ASSERT_TRUE(LoadExtension(extension_c_path)); |
| 224 | 224 |
| 225 // Extension C loaded again. | 225 // Extension C loaded again. |
| 226 EXPECT_EQ(5, inserted_count_); | 226 EXPECT_EQ(5, inserted_count_); |
| 227 EXPECT_EQ(2u, model_->size()); | 227 EXPECT_EQ(2u, model_->size()); |
| 228 // Make sure it gets its old spot in the list (at the very end). | 228 // Make sure it gets its old spot in the list (at the very end). |
| 229 ASSERT_STREQ(idC.c_str(), ExtensionAt(1)->id().c_str()); | 229 ASSERT_STREQ(idC.c_str(), ExtensionAt(1)->id().c_str()); |
| 230 } | 230 } |
| OLD | NEW |