Home | History | Annotate | Download | only in content_settings
      1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #import <Cocoa/Cocoa.h>
      6 
      7 #include "base/memory/ref_counted.h"
      8 #include "chrome/browser/profiles/profile.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"
     14 
     15 namespace {
     16 
     17 class CollectedCookiesWindowControllerTest : public RenderViewHostTestHarness {
     18 };
     19 
     20 TEST_F(CollectedCookiesWindowControllerTest, Construction) {
     21   BrowserThread ui_thread(BrowserThread::UI, MessageLoop::current());
     22   // Create a test tab.  SiteInstance will be deleted when tabContents is
     23   // deleted.
     24   SiteInstance* instance =
     25       SiteInstance::CreateSiteInstance(profile_.get());
     26   TestTabContents* tabContents = new TestTabContents(profile_.get(),
     27                                                       instance);
     28   CollectedCookiesWindowController* controller =
     29       [[CollectedCookiesWindowController alloc]
     30           initWithTabContents:tabContents];
     31 
     32   [controller release];
     33 
     34   delete tabContents;
     35 }
     36 
     37 }  // namespace
     38 
     39