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

Side by Side Diff: chrome/browser/chrome_content_browser_client_unittest.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // each call and increasing the tab count by 2. 82 // each call and increasing the tab count by 2.
83 TEST_F(ChromeContentBrowserClientWindowTest, OpenURL) { 83 TEST_F(ChromeContentBrowserClientWindowTest, OpenURL) {
84 ChromeContentBrowserClient client; 84 ChromeContentBrowserClient client;
85 85
86 int previous_count = browser()->tab_strip_model()->count(); 86 int previous_count = browser()->tab_strip_model()->count();
87 87
88 GURL urls[] = { GURL("https://www.google.com"), 88 GURL urls[] = { GURL("https://www.google.com"),
89 GURL("https://www.chromium.org") }; 89 GURL("https://www.chromium.org") };
90 90
91 for (const GURL& url : urls) { 91 for (const GURL& url : urls) {
92 content::OpenURLParams params(url, 92 content::OpenURLParams params(url, content::Referrer(),
93 content::Referrer(), 93 WindowOpenDisposition::NEW_FOREGROUND_TAB,
94 NEW_FOREGROUND_TAB, 94 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, false);
95 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
96 false);
97 // TODO(peter): We should have more in-depth browser tests for the window 95 // TODO(peter): We should have more in-depth browser tests for the window
98 // opening functionality, which also covers Android. This test can currently 96 // opening functionality, which also covers Android. This test can currently
99 // only be ran on platforms where OpenURL is implemented synchronously. 97 // only be ran on platforms where OpenURL is implemented synchronously.
100 // See https://crbug.com/457667. 98 // See https://crbug.com/457667.
101 content::WebContents* web_contents = nullptr; 99 content::WebContents* web_contents = nullptr;
102 client.OpenURL(browser()->profile(), 100 client.OpenURL(browser()->profile(),
103 params, 101 params,
104 base::Bind(&DidOpenURLForWindowTest, &web_contents)); 102 base::Bind(&DidOpenURLForWindowTest, &web_contents));
105 103
106 EXPECT_TRUE(web_contents); 104 EXPECT_TRUE(web_contents);
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 client.ClearSiteData( 708 client.ClearSiteData(
711 profile(), origin, true /* cookies */, false /* storage */, 709 profile(), origin, true /* cookies */, false /* storage */,
712 true /* cache */, 710 true /* cache */,
713 base::Bind( 711 base::Bind(
714 &ChromeContentBrowserClientClearSiteDataTest::SetClearingFinished, 712 &ChromeContentBrowserClientClearSiteDataTest::SetClearingFinished,
715 base::Unretained(this), true)); 713 base::Unretained(this), true));
716 EXPECT_TRUE(IsClearingFinished()); 714 EXPECT_TRUE(IsClearingFinished());
717 } 715 }
718 716
719 } // namespace 717 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/captive_portal/captive_portal_browsertest.cc ('k') | chrome/browser/chromeos/app_mode/startup_app_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698