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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 "chrome/browser/ui/tab_modal_confirm_dialog_browsertest.h" 5 #include "chrome/browser/ui/tab_modal_confirm_dialog_browsertest.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/lifetime/application_lifetime.h" 9 #include "chrome/browser/lifetime/application_lifetime.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 delegate_->Close(); 113 delegate_->Close();
114 EXPECT_EQ(0, accepted_count_); 114 EXPECT_EQ(0, accepted_count_);
115 EXPECT_EQ(0, canceled_count_); 115 EXPECT_EQ(0, canceled_count_);
116 EXPECT_EQ(1, closed_count_); 116 EXPECT_EQ(1, closed_count_);
117 } 117 }
118 118
119 IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, Navigate) { 119 IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, Navigate) {
120 content::OpenURLParams params(GURL("about:blank"), 120 content::OpenURLParams params(GURL("about:blank"),
121 content::Referrer(), 121 content::Referrer(),
122 CURRENT_TAB, 122 CURRENT_TAB,
123 content::PAGE_TRANSITION_LINK, 123 ui::PAGE_TRANSITION_LINK,
124 false); 124 false);
125 browser()->tab_strip_model()->GetActiveWebContents()->OpenURL(params); 125 browser()->tab_strip_model()->GetActiveWebContents()->OpenURL(params);
126 126
127 EXPECT_EQ(0, accepted_count_); 127 EXPECT_EQ(0, accepted_count_);
128 EXPECT_EQ(0, canceled_count_); 128 EXPECT_EQ(0, canceled_count_);
129 EXPECT_EQ(1, closed_count_); 129 EXPECT_EQ(1, closed_count_);
130 } 130 }
131 131
132 IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, Quit) { 132 IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, Quit) {
133 base::MessageLoopForUI::current()->PostTask(FROM_HERE, 133 base::MessageLoopForUI::current()->PostTask(FROM_HERE,
134 base::Bind(&chrome::AttemptExit)); 134 base::Bind(&chrome::AttemptExit));
135 content::RunMessageLoop(); 135 content::RunMessageLoop();
136 EXPECT_EQ(0, accepted_count_); 136 EXPECT_EQ(0, accepted_count_);
137 EXPECT_EQ(0, canceled_count_); 137 EXPECT_EQ(0, canceled_count_);
138 EXPECT_EQ(1, closed_count_); 138 EXPECT_EQ(1, closed_count_);
139 } 139 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_contents/core_tab_helper.cc ('k') | chrome/browser/ui/tabs/tab_strip_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698