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

Side by Side Diff: chrome/browser/ui/webui/web_dialog_web_contents_delegate_unittest.cc

Issue 2338133006: [NTP] Fix article suggestion clicks contributing to Most Visited tiles (Closed)
Patch Set: Updated trivial occurrence in unit test. 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 "ui/web_dialogs/web_dialog_web_contents_delegate.h" 5 #include "ui/web_dialogs/web_dialog_web_contents_delegate.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 protected: 60 protected:
61 std::unique_ptr<TestWebContentsDelegate> test_web_contents_delegate_; 61 std::unique_ptr<TestWebContentsDelegate> test_web_contents_delegate_;
62 }; 62 };
63 63
64 TEST_F(WebDialogWebContentsDelegateTest, DoNothingMethodsTest) { 64 TEST_F(WebDialogWebContentsDelegateTest, DoNothingMethodsTest) {
65 // None of the following calls should do anything. 65 // None of the following calls should do anything.
66 EXPECT_TRUE(test_web_contents_delegate_->IsPopupOrPanel(NULL)); 66 EXPECT_TRUE(test_web_contents_delegate_->IsPopupOrPanel(NULL));
67 history::HistoryAddPageArgs should_add_args( 67 history::HistoryAddPageArgs should_add_args(
68 GURL(), base::Time::Now(), 0, 0, GURL(), history::RedirectList(), 68 GURL(), base::Time::Now(), 0, 0, GURL(), history::RedirectList(),
69 ui::PAGE_TRANSITION_TYPED, history::SOURCE_SYNCED, false); 69 ui::PAGE_TRANSITION_TYPED, history::SOURCE_SYNCED, false, true);
70 test_web_contents_delegate_->NavigationStateChanged( 70 test_web_contents_delegate_->NavigationStateChanged(
71 NULL, content::InvalidateTypes(0)); 71 NULL, content::InvalidateTypes(0));
72 test_web_contents_delegate_->ActivateContents(NULL); 72 test_web_contents_delegate_->ActivateContents(NULL);
73 test_web_contents_delegate_->LoadingStateChanged(NULL, true); 73 test_web_contents_delegate_->LoadingStateChanged(NULL, true);
74 test_web_contents_delegate_->CloseContents(NULL); 74 test_web_contents_delegate_->CloseContents(NULL);
75 test_web_contents_delegate_->UpdateTargetURL(NULL, GURL()); 75 test_web_contents_delegate_->UpdateTargetURL(NULL, GURL());
76 test_web_contents_delegate_->MoveContents(NULL, gfx::Rect()); 76 test_web_contents_delegate_->MoveContents(NULL, gfx::Rect());
77 EXPECT_EQ(0, browser()->tab_strip_model()->count()); 77 EXPECT_EQ(0, browser()->tab_strip_model()->count());
78 EXPECT_EQ(1U, chrome::GetTotalBrowserCount()); 78 EXPECT_EQ(1U, chrome::GetTotalBrowserCount());
79 } 79 }
(...skipping 29 matching lines...) Expand all
109 WindowOpenDisposition::NEW_FOREGROUND_TAB, 109 WindowOpenDisposition::NEW_FOREGROUND_TAB,
110 ui::PAGE_TRANSITION_LINK, false)); 110 ui::PAGE_TRANSITION_LINK, false));
111 test_web_contents_delegate_->AddNewContents( 111 test_web_contents_delegate_->AddNewContents(
112 NULL, NULL, WindowOpenDisposition::NEW_FOREGROUND_TAB, gfx::Rect(), false, 112 NULL, NULL, WindowOpenDisposition::NEW_FOREGROUND_TAB, gfx::Rect(), false,
113 NULL); 113 NULL);
114 EXPECT_EQ(0, browser()->tab_strip_model()->count()); 114 EXPECT_EQ(0, browser()->tab_strip_model()->count());
115 EXPECT_EQ(1U, chrome::GetTotalBrowserCount()); 115 EXPECT_EQ(1U, chrome::GetTotalBrowserCount());
116 } 116 }
117 117
118 } // namespace 118 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698