| 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/extensions/extension_process_manager.h" | 5 #include "chrome/browser/extensions/extension_process_manager.h" |
| 6 #include "chrome/browser/extensions/extension_error_reporter.h" | 6 #include "chrome/browser/extensions/extension_error_reporter.h" |
| 7 #include "chrome/test/base/testing_browser_process_test.h" | |
| 8 #include "chrome/test/base/testing_profile.h" | 7 #include "chrome/test/base/testing_profile.h" |
| 9 #include "content/browser/site_instance.h" | 8 #include "content/browser/site_instance.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "testing/platform_test.h" | 10 #include "testing/platform_test.h" |
| 12 | 11 |
| 13 namespace { | 12 namespace { |
| 14 | 13 |
| 15 // make the test a PlatformTest to setup autorelease pools properly on mac | 14 // make the test a PlatformTest to setup autorelease pools properly on mac |
| 16 class ExtensionProcessManagerTest : public TestingBrowserProcessTest { | 15 class ExtensionProcessManagerTest : public testing::Test { |
| 17 public: | 16 public: |
| 18 static void SetUpTestCase() { | 17 static void SetUpTestCase() { |
| 19 ExtensionErrorReporter::Init(false); // no noisy errors | 18 ExtensionErrorReporter::Init(false); // no noisy errors |
| 20 } | 19 } |
| 21 | 20 |
| 22 virtual void SetUp() { | 21 virtual void SetUp() { |
| 23 ExtensionErrorReporter::GetInstance()->ClearErrors(); | 22 ExtensionErrorReporter::GetInstance()->ClearErrors(); |
| 24 } | 23 } |
| 25 }; | 24 }; |
| 26 | 25 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 53 EXPECT_EQ(site11, site12); | 52 EXPECT_EQ(site11, site12); |
| 54 | 53 |
| 55 scoped_refptr<SiteInstance> site21 = | 54 scoped_refptr<SiteInstance> site21 = |
| 56 manager1->GetSiteInstanceForURL(ext2_url1); | 55 manager1->GetSiteInstanceForURL(ext2_url1); |
| 57 EXPECT_NE(site11, site21); | 56 EXPECT_NE(site11, site21); |
| 58 | 57 |
| 59 scoped_refptr<SiteInstance> other_profile_site = | 58 scoped_refptr<SiteInstance> other_profile_site = |
| 60 manager2->GetSiteInstanceForURL(ext1_url1); | 59 manager2->GetSiteInstanceForURL(ext1_url1); |
| 61 EXPECT_NE(site11, other_profile_site); | 60 EXPECT_NE(site11, other_profile_site); |
| 62 } | 61 } |
| OLD | NEW |