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

Side by Side Diff: chrome/browser/ui/cocoa/view_id_util_browsertest.mm

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 (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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
8 #include "chrome/browser/devtools/devtools_window_testing.h" 8 #include "chrome/browser/devtools/devtools_window_testing.h"
9 #include "chrome/browser/download/download_shelf.h" 9 #include "chrome/browser/download/download_shelf.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 ASSERT_NO_FATAL_FAILURE(DoTest()); 108 ASSERT_NO_FATAL_FAILURE(DoTest());
109 } 109 }
110 110
111 IN_PROC_BROWSER_TEST_F(ViewIDTest, Tab) { 111 IN_PROC_BROWSER_TEST_F(ViewIDTest, Tab) {
112 CheckViewID(VIEW_ID_TAB_0, true); 112 CheckViewID(VIEW_ID_TAB_0, true);
113 CheckViewID(VIEW_ID_TAB_LAST, true); 113 CheckViewID(VIEW_ID_TAB_LAST, true);
114 114
115 // Open 9 new tabs. 115 // Open 9 new tabs.
116 for (int i = 1; i <= 9; ++i) { 116 for (int i = 1; i <= 9; ++i) {
117 CheckViewID(static_cast<ViewID>(VIEW_ID_TAB_0 + i), false); 117 CheckViewID(static_cast<ViewID>(VIEW_ID_TAB_0 + i), false);
118 browser()->OpenURL(OpenURLParams(GURL(url::kAboutBlankURL), 118 browser()->OpenURL(OpenURLParams(GURL(url::kAboutBlankURL), Referrer(),
119 Referrer(), 119 WindowOpenDisposition::NEW_BACKGROUND_TAB,
120 NEW_BACKGROUND_TAB, 120 ui::PAGE_TRANSITION_TYPED, false));
121 ui::PAGE_TRANSITION_TYPED,
122 false));
123 CheckViewID(static_cast<ViewID>(VIEW_ID_TAB_0 + i), true); 121 CheckViewID(static_cast<ViewID>(VIEW_ID_TAB_0 + i), true);
124 // VIEW_ID_TAB_LAST should always be available. 122 // VIEW_ID_TAB_LAST should always be available.
125 CheckViewID(VIEW_ID_TAB_LAST, true); 123 CheckViewID(VIEW_ID_TAB_LAST, true);
126 } 124 }
127 125
128 // Open the 11th tab. 126 // Open the 11th tab.
129 browser()->OpenURL(OpenURLParams(GURL(url::kAboutBlankURL), 127 browser()->OpenURL(OpenURLParams(GURL(url::kAboutBlankURL), Referrer(),
130 Referrer(), 128 WindowOpenDisposition::NEW_BACKGROUND_TAB,
131 NEW_BACKGROUND_TAB, 129 ui::PAGE_TRANSITION_TYPED, false));
132 ui::PAGE_TRANSITION_TYPED,
133 false));
134 CheckViewID(VIEW_ID_TAB_LAST, true); 130 CheckViewID(VIEW_ID_TAB_LAST, true);
135 } 131 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698