| Index: chrome/browser/extensions/extension_apitest.cc
|
| diff --git a/chrome/browser/extensions/extension_apitest.cc b/chrome/browser/extensions/extension_apitest.cc
|
| index ba4da598086e0b7dfc6c2566f1d6f150ec13ce50..c5e1f54b8b8c266127bf2128fd76de806c7433c9 100644
|
| --- a/chrome/browser/extensions/extension_apitest.cc
|
| +++ b/chrome/browser/extensions/extension_apitest.cc
|
| @@ -11,7 +11,8 @@
|
| #include "chrome/common/notification_registrar.h"
|
| #include "chrome/test/ui_test_utils.h"
|
|
|
| -ExtensionApiTest::ResultCatcher::ResultCatcher() {
|
| +ExtensionApiTest::ResultCatcher::ResultCatcher()
|
| + : profile_restriction_(NULL) {
|
| registrar_.Add(this, NotificationType::EXTENSION_TEST_PASSED,
|
| NotificationService::AllSources());
|
| registrar_.Add(this, NotificationType::EXTENSION_TEST_FAILED,
|
| @@ -44,6 +45,11 @@ bool ExtensionApiTest::ResultCatcher::GetNextResult() {
|
| void ExtensionApiTest::ResultCatcher::Observe(
|
| NotificationType type, const NotificationSource& source,
|
| const NotificationDetails& details) {
|
| + if (profile_restriction_ &&
|
| + Source<Profile>(source).ptr() != profile_restriction_) {
|
| + return;
|
| + }
|
| +
|
| switch (type.value) {
|
| case NotificationType::EXTENSION_TEST_PASSED:
|
| std::cout << "Got EXTENSION_TEST_PASSED notification.\n";
|
|
|