OLD | NEW |
---|---|
1 | |
Aaron Boodman
2011/11/11 20:06:14
whoops
| |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 4 // found in the LICENSE file. |
4 | 5 |
5 #include "base/file_path.h" | 6 #include "base/file_path.h" |
6 #include "base/logging.h" | 7 #include "base/logging.h" |
7 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
8 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
9 #include "base/values.h" | 10 #include "base/values.h" |
10 #include "chrome/common/extensions/extension.h" | 11 #include "chrome/common/extensions/extension.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 | 108 |
108 // Both of these should be NULL, which mean true for InSameExtent. | 109 // Both of these should be NULL, which mean true for InSameExtent. |
109 EXPECT_TRUE(extensions.InSameExtent( | 110 EXPECT_TRUE(extensions.InSameExtent( |
110 GURL("http://www.google.com/"), | 111 GURL("http://www.google.com/"), |
111 GURL("http://blog.chromium.org/"))); | 112 GURL("http://blog.chromium.org/"))); |
112 | 113 |
113 // Remove one of the extensions. | 114 // Remove one of the extensions. |
114 extensions.Remove(ext2->id()); | 115 extensions.Remove(ext2->id()); |
115 EXPECT_EQ(2u, extensions.size()); | 116 EXPECT_EQ(2u, extensions.size()); |
116 EXPECT_FALSE(extensions.GetByID(ext2->id())); | 117 EXPECT_FALSE(extensions.GetByID(ext2->id())); |
118 | |
119 // Does Clear() clear? | |
120 extensions.Clear(); | |
121 EXPECT_EQ(0u, extensions.size()); | |
117 } | 122 } |
OLD | NEW |