| 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/ref_counted.h" | 7 #include "base/ref_counted.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/renderer_host/site_instance.h" | |
| 10 #include "chrome/browser/renderer_host/test/test_render_view_host.h" | |
| 11 #include "chrome/browser/tab_contents/test_tab_contents.h" | |
| 12 #import "chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h" | 9 #import "chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h" |
| 10 #include "content/browser/renderer_host/test_render_view_host.h" |
| 11 #include "content/browser/site_instance.h" |
| 12 #include "content/browser/tab_contents/test_tab_contents.h" |
| 13 #include "chrome/test/testing_profile.h" | 13 #include "chrome/test/testing_profile.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 class CollectedCookiesWindowControllerTest : public RenderViewHostTestHarness { | 17 class CollectedCookiesWindowControllerTest : public RenderViewHostTestHarness { |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 TEST_F(CollectedCookiesWindowControllerTest, Construction) { | 20 TEST_F(CollectedCookiesWindowControllerTest, Construction) { |
| 21 BrowserThread ui_thread(BrowserThread::UI, MessageLoop::current()); | 21 BrowserThread ui_thread(BrowserThread::UI, MessageLoop::current()); |
| 22 // Create a test tab. SiteInstance will be deleted when tabContents is | 22 // Create a test tab. SiteInstance will be deleted when tabContents is |
| 23 // deleted. | 23 // deleted. |
| 24 SiteInstance* instance = | 24 SiteInstance* instance = |
| 25 SiteInstance::CreateSiteInstance(profile_.get()); | 25 SiteInstance::CreateSiteInstance(profile_.get()); |
| 26 TestTabContents* tabContents = new TestTabContents(profile_.get(), | 26 TestTabContents* tabContents = new TestTabContents(profile_.get(), |
| 27 instance); | 27 instance); |
| 28 CollectedCookiesWindowController* controller = | 28 CollectedCookiesWindowController* controller = |
| 29 [[CollectedCookiesWindowController alloc] | 29 [[CollectedCookiesWindowController alloc] |
| 30 initWithTabContents:tabContents]; | 30 initWithTabContents:tabContents]; |
| 31 | 31 |
| 32 [controller release]; | 32 [controller release]; |
| 33 | 33 |
| 34 delete tabContents; | 34 delete tabContents; |
| 35 } | 35 } |
| 36 | 36 |
| 37 } // namespace | 37 } // namespace |
| 38 | 38 |
| OLD | NEW |