Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(776)

Side by Side Diff: chrome/browser/cocoa/tabpose_window_unittest.mm

Issue 3325012: Fix SessionStorage (Closed)
Patch Set: kill the last (new) dcheck Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/cocoa/tabpose_window.h" 5 #import "chrome/browser/cocoa/tabpose_window.h"
6 6
7 #import "chrome/browser/browser_window.h" 7 #import "chrome/browser/browser_window.h"
8 #import "chrome/browser/cocoa/browser_test_helper.h" 8 #import "chrome/browser/cocoa/browser_test_helper.h"
9 #import "chrome/browser/cocoa/cocoa_test_helper.h" 9 #import "chrome/browser/cocoa/cocoa_test_helper.h"
10 #include "chrome/browser/renderer_host/site_instance.h" 10 #include "chrome/browser/renderer_host/site_instance.h"
11 #include "chrome/browser/tab_contents/tab_contents.h" 11 #include "chrome/browser/tab_contents/tab_contents.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 class TabposeWindowTest : public CocoaTest { 14 class TabposeWindowTest : public CocoaTest {
15 public: 15 public:
16 TabposeWindowTest() { 16 TabposeWindowTest() {
17 site_instance_ = 17 site_instance_ =
18 SiteInstance::CreateSiteInstance(browser_helper_.profile()); 18 SiteInstance::CreateSiteInstance(browser_helper_.profile());
19 } 19 }
20 20
21 void AppendTabToStrip() { 21 void AppendTabToStrip() {
22 TabContents* tab_contents = new TabContents( 22 TabContents* tab_contents = new TabContents(
23 browser_helper_.profile(), site_instance_, MSG_ROUTING_NONE, NULL); 23 browser_helper_.profile(), site_instance_, MSG_ROUTING_NONE,
24 NULL, NULL);
24 browser_helper_.browser()->tabstrip_model()->AppendTabContents( 25 browser_helper_.browser()->tabstrip_model()->AppendTabContents(
25 tab_contents, /*foreground=*/true); 26 tab_contents, /*foreground=*/true);
26 } 27 }
27 28
28 BrowserTestHelper browser_helper_; 29 BrowserTestHelper browser_helper_;
29 scoped_refptr<SiteInstance> site_instance_; 30 scoped_refptr<SiteInstance> site_instance_;
30 }; 31 };
31 32
32 // Check that this doesn't leak. 33 // Check that this doesn't leak.
33 TEST_F(TabposeWindowTest, TestShow) { 34 TEST_F(TabposeWindowTest, TestShow) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 [window selectTileAtIndexWithoutAnimation:1]; 108 [window selectTileAtIndexWithoutAnimation:1];
108 model->CloseTabContentsAt(0, TabStripModel::CLOSE_NONE); 109 model->CloseTabContentsAt(0, TabStripModel::CLOSE_NONE);
109 DCHECK_EQ([window thumbnailLayerCount], 1u); 110 DCHECK_EQ([window thumbnailLayerCount], 1u);
110 DCHECK_EQ([window selectedIndex], 0); 111 DCHECK_EQ([window selectedIndex], 0);
111 112
112 // Should release the window. 113 // Should release the window.
113 [window mouseDown:nil]; 114 [window mouseDown:nil];
114 115
115 browser_helper_.CloseBrowserWindow(); 116 browser_helper_.CloseBrowserWindow();
116 } 117 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/tab_strip_controller_unittest.mm ('k') | chrome/browser/cocoa/translate/translate_infobar_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698