summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/collected_cookies_mac_unittest.mm
blob: 033cc717a36e0f19fb94296ac34835cd07a8a4c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import <Cocoa/Cocoa.h>

#import "chrome/browser/cocoa/collected_cookies_mac.h"

#include "base/ref_counted.h"
#include "chrome/browser/renderer_host/site_instance.h"
#include "chrome/browser/renderer_host/test/test_render_view_host.h"
#include "chrome/browser/tab_contents/test_tab_contents.h"
#include "chrome/browser/profile.h"
#include "chrome/test/testing_profile.h"

namespace {

class CollectedCookiesWindowControllerTest : public RenderViewHostTestHarness {
};

TEST_F(CollectedCookiesWindowControllerTest, Construction) {
  ChromeThread ui_thread(ChromeThread::UI, MessageLoop::current());
  // Create a test tab.  SiteInstance will be deleted when tabContents is
  // deleted.
  SiteInstance* instance =
      SiteInstance::CreateSiteInstance(profile_.get());
  TestTabContents* tabContents = new TestTabContents(profile_.get(),
                                                      instance);
  CollectedCookiesWindowController* controller =
      [[CollectedCookiesWindowController alloc]
          initWithTabContents:tabContents];

  [controller release];

  delete tabContents;
}

}  // namespace