| 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 #include "chrome/browser/profiles/profile_destroyer.h" | 5 #include "chrome/browser/profiles/profile_destroyer.h" |
| 6 | 6 |
| 7 #include "base/macros.h" |
| 7 #include "chrome/test/base/browser_with_test_window_test.h" | 8 #include "chrome/test/base/browser_with_test_window_test.h" |
| 8 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
| 9 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
| 10 #include "content/public/browser/site_instance.h" | 11 #include "content/public/browser/site_instance.h" |
| 11 | 12 |
| 12 class TestingOffTheRecordDestructionProfile : public TestingProfile { | 13 class TestingOffTheRecordDestructionProfile : public TestingProfile { |
| 13 public: | 14 public: |
| 14 TestingOffTheRecordDestructionProfile() | 15 TestingOffTheRecordDestructionProfile() |
| 15 : TestingProfile(base::FilePath(), | 16 : TestingProfile(base::FilePath(), |
| 16 NULL, | 17 NULL, |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 scoped_ptr<content::RenderProcessHost> render_process_host2; | 137 scoped_ptr<content::RenderProcessHost> render_process_host2; |
| 137 render_process_host2.reset(instance2->GetProcess()); | 138 render_process_host2.reset(instance2->GetProcess()); |
| 138 ASSERT_TRUE(render_process_host2.get() != NULL); | 139 ASSERT_TRUE(render_process_host2.get() != NULL); |
| 139 | 140 |
| 140 ProfileDestroyer::DestroyProfileWhenAppropriate(main_profile); | 141 ProfileDestroyer::DestroyProfileWhenAppropriate(main_profile); |
| 141 EXPECT_EQ(main_profile, TestingOriginalDestructionProfile::living_instance_); | 142 EXPECT_EQ(main_profile, TestingOriginalDestructionProfile::living_instance_); |
| 142 render_process_host2.release()->Cleanup(); | 143 render_process_host2.release()->Cleanup(); |
| 143 base::MessageLoop::current()->RunUntilIdle(); | 144 base::MessageLoop::current()->RunUntilIdle(); |
| 144 EXPECT_EQ(NULL, TestingOriginalDestructionProfile::living_instance_); | 145 EXPECT_EQ(NULL, TestingOriginalDestructionProfile::living_instance_); |
| 145 } | 146 } |
| OLD | NEW |