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