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

Side by Side Diff: chrome/test/base/web_ui_browser_test.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix weird formatting in recent_tabs_sub_menu_model.cc 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/test/base/web_ui_browser_test.h" 5 #include "chrome/test/base/web_ui_browser_test.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 } 214 }
215 215
216 void WebUIBrowserTest::BrowsePreload(const GURL& browse_to) { 216 void WebUIBrowserTest::BrowsePreload(const GURL& browse_to) {
217 content::WebContents* web_contents = 217 content::WebContents* web_contents =
218 browser()->tab_strip_model()->GetActiveWebContents(); 218 browser()->tab_strip_model()->GetActiveWebContents();
219 WebUIJsInjectionReadyObserver injection_observer( 219 WebUIJsInjectionReadyObserver injection_observer(
220 web_contents, this, preload_test_fixture_, preload_test_name_); 220 web_contents, this, preload_test_fixture_, preload_test_name_);
221 content::TestNavigationObserver navigation_observer(web_contents); 221 content::TestNavigationObserver navigation_observer(web_contents);
222 chrome::NavigateParams params( 222 chrome::NavigateParams params(
223 browser(), GURL(browse_to), ui::PAGE_TRANSITION_TYPED); 223 browser(), GURL(browse_to), ui::PAGE_TRANSITION_TYPED);
224 params.disposition = CURRENT_TAB; 224 params.disposition = WindowOpenDisposition::CURRENT_TAB;
225 chrome::Navigate(&params); 225 chrome::Navigate(&params);
226 navigation_observer.Wait(); 226 navigation_observer.Wait();
227 } 227 }
228 228
229 #if defined(ENABLE_PRINT_PREVIEW) 229 #if defined(ENABLE_PRINT_PREVIEW)
230 230
231 // This custom ContentBrowserClient is used to get notified when a WebContents 231 // This custom ContentBrowserClient is used to get notified when a WebContents
232 // for the print preview dialog gets created. 232 // for the print preview dialog gets created.
233 class PrintContentBrowserClient : public ChromeContentBrowserClient { 233 class PrintContentBrowserClient : public ChromeContentBrowserClient {
234 public: 234 public:
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 } 488 }
489 489
490 GURL WebUIBrowserTest::WebUITestDataPathToURL( 490 GURL WebUIBrowserTest::WebUITestDataPathToURL(
491 const base::FilePath::StringType& path) { 491 const base::FilePath::StringType& path) {
492 base::FilePath dir_test_data; 492 base::FilePath dir_test_data;
493 EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &dir_test_data)); 493 EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &dir_test_data));
494 base::FilePath test_path(dir_test_data.Append(kWebUITestFolder).Append(path)); 494 base::FilePath test_path(dir_test_data.Append(kWebUITestFolder).Append(path));
495 EXPECT_TRUE(base::PathExists(test_path)); 495 EXPECT_TRUE(base::PathExists(test_path));
496 return net::FilePathToFileURL(test_path); 496 return net::FilePathToFileURL(test_path);
497 } 497 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698