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

Side by Side Diff: chrome/browser/ui/browser_browsertest.cc

Issue 187443008: Elim Browser::AppType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and add non trusted type test Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after
1951 EXPECT_EQ(popup_browser, params1.target); 1951 EXPECT_EQ(popup_browser, params1.target);
1952 1952
1953 // The popup should still only have one tab. 1953 // The popup should still only have one tab.
1954 EXPECT_EQ(1, popup_browser->tab_strip_model()->count()); 1954 EXPECT_EQ(1, popup_browser->tab_strip_model()->count());
1955 1955
1956 // The normal browser should now have two. 1956 // The normal browser should now have two.
1957 EXPECT_EQ(2, browser()->tab_strip_model()->count()); 1957 EXPECT_EQ(2, browser()->tab_strip_model()->count());
1958 1958
1959 // Open an app frame browser with a single blank foreground tab. 1959 // Open an app frame browser with a single blank foreground tab.
1960 Browser* app_browser = new Browser(Browser::CreateParams::CreateForApp( 1960 Browser* app_browser = new Browser(Browser::CreateParams::CreateForApp(
1961 L"Test", browser()->profile(), false)); 1961 Browser::TYPE_POPUP, L"Test", browser()->profile(), false));
1962 chrome::AddTabAt(app_browser, GURL(), -1, true); 1962 chrome::AddTabAt(app_browser, GURL(), -1, true);
1963 EXPECT_EQ(1, app_browser->tab_strip_model()->count()); 1963 EXPECT_EQ(1, app_browser->tab_strip_model()->count());
1964 1964
1965 // Now try opening another tab in the app browser. 1965 // Now try opening another tab in the app browser.
1966 AddTabWithURLParams params2(GURL(content::kAboutBlankURL), 1966 AddTabWithURLParams params2(GURL(content::kAboutBlankURL),
1967 content::PAGE_TRANSITION_TYPED); 1967 content::PAGE_TRANSITION_TYPED);
1968 app_browser->AddTabWithURL(&params2); 1968 app_browser->AddTabWithURL(&params2);
1969 EXPECT_EQ(app_browser, params2.target); 1969 EXPECT_EQ(app_browser, params2.target);
1970 1970
1971 // The popup should still only have one tab. 1971 // The popup should still only have one tab.
1972 EXPECT_EQ(1, app_browser->tab_strip_model()->count()); 1972 EXPECT_EQ(1, app_browser->tab_strip_model()->count());
1973 1973
1974 // The normal browser should now have three. 1974 // The normal browser should now have three.
1975 EXPECT_EQ(3, browser()->tab_strip_model()->count()); 1975 EXPECT_EQ(3, browser()->tab_strip_model()->count());
1976 1976
1977 // Open an app frame popup browser with a single blank foreground tab. 1977 // Open an app frame popup browser with a single blank foreground tab.
1978 Browser* app_popup_browser = new Browser(Browser::CreateParams::CreateForApp( 1978 Browser* app_popup_browser = new Browser(Browser::CreateParams::CreateForApp(
1979 L"Test", browser()->profile(), false)); 1979 Browser::TYPE_POPUP, L"Test", browser()->profile(), false));
1980 chrome::AddTabAt(app_popup_browser, GURL(), -1, true); 1980 chrome::AddTabAt(app_popup_browser, GURL(), -1, true);
1981 EXPECT_EQ(1, app_popup_browser->tab_strip_model()->count()); 1981 EXPECT_EQ(1, app_popup_browser->tab_strip_model()->count());
1982 1982
1983 // Now try opening another tab in the app popup browser. 1983 // Now try opening another tab in the app popup browser.
1984 AddTabWithURLParams params3(GURL(content::kAboutBlankURL), 1984 AddTabWithURLParams params3(GURL(content::kAboutBlankURL),
1985 content::PAGE_TRANSITION_TYPED); 1985 content::PAGE_TRANSITION_TYPED);
1986 app_popup_browser->AddTabWithURL(&params3); 1986 app_popup_browser->AddTabWithURL(&params3);
1987 EXPECT_EQ(app_popup_browser, params3.target); 1987 EXPECT_EQ(app_popup_browser, params3.target);
1988 1988
1989 // The popup should still only have one tab. 1989 // The popup should still only have one tab.
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
2604 #endif 2604 #endif
2605 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); 2605 EXPECT_EQ(exp_commit_size, rwhv_commit_size2);
2606 EXPECT_EQ(exp_commit_size, wcv_commit_size2); 2606 EXPECT_EQ(exp_commit_size, wcv_commit_size2);
2607 gfx::Size exp_final_size(initial_wcv_size); 2607 gfx::Size exp_final_size(initial_wcv_size);
2608 exp_final_size.Enlarge(wcv_resize_insets.width(), 2608 exp_final_size.Enlarge(wcv_resize_insets.width(),
2609 wcv_resize_insets.height() + height_inset); 2609 wcv_resize_insets.height() + height_inset);
2610 EXPECT_EQ(exp_final_size, 2610 EXPECT_EQ(exp_final_size,
2611 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); 2611 web_contents->GetRenderWidgetHostView()->GetViewBounds().size());
2612 EXPECT_EQ(exp_final_size, web_contents->GetView()->GetContainerSize()); 2612 EXPECT_EQ(exp_final_size, web_contents->GetView()->GetContainerSize());
2613 } 2613 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698