| OLD | NEW | 
|    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 "chrome/browser/tab_contents_wrapper.h" | 
|   12 #include "chrome/browser/tabs/tab_strip_model.h" |   13 #include "chrome/browser/tabs/tab_strip_model.h" | 
|   13 #include "testing/gtest/include/gtest/gtest.h" |   14 #include "testing/gtest/include/gtest/gtest.h" | 
|   14  |   15  | 
|   15 class TabposeWindowTest : public CocoaTest { |   16 class TabposeWindowTest : public CocoaTest { | 
|   16  public: |   17  public: | 
|   17   TabposeWindowTest() { |   18   TabposeWindowTest() { | 
|   18     site_instance_ = |   19     site_instance_ = | 
|   19         SiteInstance::CreateSiteInstance(browser_helper_.profile()); |   20         SiteInstance::CreateSiteInstance(browser_helper_.profile()); | 
|   20   } |   21   } | 
|   21  |   22  | 
|   22   void AppendTabToStrip() { |   23   void AppendTabToStrip() { | 
|   23     TabContents* tab_contents = new TabContents( |   24     TabContentsWrapper* tab_contents = Browser::TabContentsFactory( | 
|   24         browser_helper_.profile(), site_instance_, MSG_ROUTING_NONE, |   25         browser_helper_.profile(), site_instance_, MSG_ROUTING_NONE, | 
|   25         NULL, NULL); |   26         NULL, NULL); | 
|   26     browser_helper_.browser()->tabstrip_model()->AppendTabContents( |   27     browser_helper_.browser()->tabstrip_model()->AppendTabContents( | 
|   27         tab_contents, /*foreground=*/true); |   28         tab_contents, /*foreground=*/true); | 
|   28   } |   29   } | 
|   29  |   30  | 
|   30   BrowserTestHelper browser_helper_; |   31   BrowserTestHelper browser_helper_; | 
|   31   scoped_refptr<SiteInstance> site_instance_; |   32   scoped_refptr<SiteInstance> site_instance_; | 
|   32 }; |   33 }; | 
|   33  |   34  | 
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  109   [window selectTileAtIndexWithoutAnimation:1]; |  110   [window selectTileAtIndexWithoutAnimation:1]; | 
|  110   model->CloseTabContentsAt(0, TabStripModel::CLOSE_NONE); |  111   model->CloseTabContentsAt(0, TabStripModel::CLOSE_NONE); | 
|  111   DCHECK_EQ([window thumbnailLayerCount], 1u); |  112   DCHECK_EQ([window thumbnailLayerCount], 1u); | 
|  112   DCHECK_EQ([window selectedIndex], 0); |  113   DCHECK_EQ([window selectedIndex], 0); | 
|  113  |  114  | 
|  114   // Should release the window. |  115   // Should release the window. | 
|  115   [window mouseDown:nil]; |  116   [window mouseDown:nil]; | 
|  116  |  117  | 
|  117   browser_helper_.CloseBrowserWindow(); |  118   browser_helper_.CloseBrowserWindow(); | 
|  118 } |  119 } | 
| OLD | NEW |