| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_notification_observer.h" | 5 #include "chrome/browser/extensions/extension_notification_observer.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 11 #include "chrome/common/extensions/extension.h" | 11 #include "extensions/common/extension.h" |
| 12 | 12 |
| 13 namespace extensions { | 13 namespace extensions { |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 std::string Str(const std::vector<chrome::NotificationType>& types) { | 17 std::string Str(const std::vector<chrome::NotificationType>& types) { |
| 18 std::string str = "["; | 18 std::string str = "["; |
| 19 bool needs_comma = false; | 19 bool needs_comma = false; |
| 20 for (std::vector<chrome::NotificationType>::const_iterator it = | 20 for (std::vector<chrome::NotificationType>::const_iterator it = |
| 21 types.begin(); it != types.end(); ++it) { | 21 types.begin(); it != types.end(); ++it) { |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 const std::vector<chrome::NotificationType>& types) { | 132 const std::vector<chrome::NotificationType>& types) { |
| 133 testing::AssertionResult result = (notifications_ == types) ? | 133 testing::AssertionResult result = (notifications_ == types) ? |
| 134 testing::AssertionSuccess() : | 134 testing::AssertionSuccess() : |
| 135 testing::AssertionFailure() << "Expected " << Str(types) << ", " << | 135 testing::AssertionFailure() << "Expected " << Str(types) << ", " << |
| 136 "Got " << Str(notifications_); | 136 "Got " << Str(notifications_); |
| 137 notifications_.clear(); | 137 notifications_.clear(); |
| 138 return result; | 138 return result; |
| 139 } | 139 } |
| 140 | 140 |
| 141 } // namespace extensions | 141 } // namespace extensions |
| OLD | NEW |