OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/browser.h" | 5 #include "chrome/browser/browser.h" |
6 #include "chrome/browser/extensions/extension_shelf_model.h" | 6 #include "chrome/browser/extensions/extension_shelf_model.h" |
7 #include "chrome/browser/extensions/extensions_service.h" | 7 #include "chrome/browser/extensions/extensions_service.h" |
8 #include "chrome/browser/extensions/test_extension_loader.h" | 8 #include "chrome/browser/extensions/test_extension_loader.h" |
9 #include "chrome/browser/profile.h" | 9 #include "chrome/browser/profile.h" |
10 #include "chrome/common/chrome_paths.h" | 10 #include "chrome/common/chrome_paths.h" |
11 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
12 #include "chrome/common/extensions/extension_error_reporter.h" | 12 #include "chrome/common/extensions/extension_error_reporter.h" |
13 #include "chrome/test/in_process_browser_test.h" | 13 #include "chrome/test/in_process_browser_test.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // The extension we're using as our test case. | 17 // The extension we're using as our test case. |
18 const char* kExtensionId = "00123456789abcdef0123456789abcdef0123456"; | 18 const char* kExtensionId = "fc6f6ba6693faf6773c13701019f2e7a12f0febe"; |
19 | 19 |
20 }; // namespace | 20 }; // namespace |
21 | 21 |
22 | 22 |
23 // An InProcessBrowserTest for testing the ExtensionShelfModel. | 23 // An InProcessBrowserTest for testing the ExtensionShelfModel. |
24 // TODO(erikkay) It's unfortunate that this needs to be an in-proc browser test. | 24 // TODO(erikkay) It's unfortunate that this needs to be an in-proc browser test. |
25 // It would be nice to refactor things so that ExtensionShelfModel, | 25 // It would be nice to refactor things so that ExtensionShelfModel, |
26 // ExtensionHost and ExtensionsService could run without so much of the browser | 26 // ExtensionHost and ExtensionsService could run without so much of the browser |
27 // in place. | 27 // in place. |
28 class ExtensionShelfModelTest : public InProcessBrowserTest, | 28 class ExtensionShelfModelTest : public InProcessBrowserTest, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 model_->MoveToolstripAt(0, 1); | 105 model_->MoveToolstripAt(0, 1); |
106 EXPECT_EQ(two, model_->ToolstripAt(0)); | 106 EXPECT_EQ(two, model_->ToolstripAt(0)); |
107 EXPECT_EQ(one, model_->ToolstripAt(1)); | 107 EXPECT_EQ(one, model_->ToolstripAt(1)); |
108 EXPECT_EQ(moved_count_, 1); | 108 EXPECT_EQ(moved_count_, 1); |
109 | 109 |
110 model_->RemoveToolstripAt(0); | 110 model_->RemoveToolstripAt(0); |
111 EXPECT_EQ(one, model_->ToolstripAt(0)); | 111 EXPECT_EQ(one, model_->ToolstripAt(0)); |
112 EXPECT_EQ(1, model_->count()); | 112 EXPECT_EQ(1, model_->count()); |
113 EXPECT_EQ(removed_count_, 1); | 113 EXPECT_EQ(removed_count_, 1); |
114 } | 114 } |
OLD | NEW |