OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // TODO(rickcam): Bug 73183: Add unit tests for image loading | 5 // TODO(rickcam): Bug 73183: Add unit tests for image loading |
6 | 6 |
7 #include "chrome/browser/background/background_application_list_model.h" | 7 #include "chrome/browser/background/background_application_list_model.h" |
8 | 8 |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 return; | 132 return; |
133 } | 133 } |
134 extensions::PermissionsUpdater(service->profile()) | 134 extensions::PermissionsUpdater(service->profile()) |
135 .RemovePermissionsUnsafe( | 135 .RemovePermissionsUnsafe( |
136 extension, extension->permissions_data()->active_permissions()); | 136 extension, extension->permissions_data()->active_permissions()); |
137 } | 137 } |
138 } // namespace | 138 } // namespace |
139 | 139 |
140 // Crashes on Mac tryslaves. | 140 // Crashes on Mac tryslaves. |
141 // http://crbug.com/165458 | 141 // http://crbug.com/165458 |
142 #if defined(OS_MACOSX) || defined(OS_LINUX) | 142 // Also crashes on Windows under Dr. Memory (https://crbug.com/606779), |
143 #define MAYBE_ExplicitTest DISABLED_ExplicitTest | 143 // presumably broken on all platforms. |
144 #else | |
145 #define MAYBE_ExplicitTest ExplicitTest | |
146 #endif | |
147 // With minimal test logic, verifies behavior over an explicit set of | 144 // With minimal test logic, verifies behavior over an explicit set of |
148 // extensions, of which some are Background Apps and others are not. | 145 // extensions, of which some are Background Apps and others are not. |
149 TEST_F(BackgroundApplicationListModelTest, MAYBE_ExplicitTest) { | 146 TEST_F(BackgroundApplicationListModelTest, DISABLED_ExplicitTest) { |
150 InitializeAndLoadEmptyExtensionService(); | 147 InitializeAndLoadEmptyExtensionService(); |
151 ASSERT_TRUE(service()->is_ready()); | 148 ASSERT_TRUE(service()->is_ready()); |
152 ASSERT_TRUE(registry()->enabled_extensions().is_empty()); | 149 ASSERT_TRUE(registry()->enabled_extensions().is_empty()); |
153 std::unique_ptr<BackgroundApplicationListModel> model( | 150 std::unique_ptr<BackgroundApplicationListModel> model( |
154 new BackgroundApplicationListModel(profile_.get())); | 151 new BackgroundApplicationListModel(profile_.get())); |
155 ASSERT_EQ(0U, model->size()); | 152 ASSERT_EQ(0U, model->size()); |
156 | 153 |
157 scoped_refptr<Extension> ext1 = CreateExtension("alpha", false); | 154 scoped_refptr<Extension> ext1 = CreateExtension("alpha", false); |
158 scoped_refptr<Extension> ext2 = CreateExtension("bravo", false); | 155 scoped_refptr<Extension> ext2 = CreateExtension("bravo", false); |
159 scoped_refptr<Extension> ext3 = CreateExtension("charlie", false); | 156 scoped_refptr<Extension> ext3 = CreateExtension("charlie", false); |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 case 2: | 395 case 2: |
399 TogglePermission(service(), &extensions, model.get(), &expected, | 396 TogglePermission(service(), &extensions, model.get(), &expected, |
400 &count); | 397 &count); |
401 break; | 398 break; |
402 default: | 399 default: |
403 NOTREACHED(); | 400 NOTREACHED(); |
404 break; | 401 break; |
405 } | 402 } |
406 } | 403 } |
407 } | 404 } |
OLD | NEW |