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

Side by Side Diff: chrome/browser/google/google_url_tracker_unittest.cc

Issue 6989001: Misc. infobar stuff: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/google/google_url_tracker.h" 5 #include "chrome/browser/google/google_url_tracker.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/prefs/browser_prefs.h" 10 #include "chrome/browser/prefs/browser_prefs.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 TestInfoBarDelegate(GoogleURLTracker* google_url_tracker, 60 TestInfoBarDelegate(GoogleURLTracker* google_url_tracker,
61 const GURL& new_google_url); 61 const GURL& new_google_url);
62 62
63 GoogleURLTracker* google_url_tracker() const { return google_url_tracker_; } 63 GoogleURLTracker* google_url_tracker() const { return google_url_tracker_; }
64 GURL new_google_url() const { return new_google_url_; } 64 GURL new_google_url() const { return new_google_url_; }
65 65
66 private: 66 private:
67 virtual ~TestInfoBarDelegate(); 67 virtual ~TestInfoBarDelegate();
68 68
69 // InfoBarDelegate: 69 // InfoBarDelegate:
70 virtual InfoBar* CreateInfoBar(); 70 virtual InfoBar* CreateInfoBar(TabContentsWrapper* owner);
71 71
72 GoogleURLTracker* google_url_tracker_; 72 GoogleURLTracker* google_url_tracker_;
73 GURL new_google_url_; 73 GURL new_google_url_;
74 }; 74 };
75 75
76 TestInfoBarDelegate::TestInfoBarDelegate(GoogleURLTracker* google_url_tracker, 76 TestInfoBarDelegate::TestInfoBarDelegate(GoogleURLTracker* google_url_tracker,
77 const GURL& new_google_url) 77 const GURL& new_google_url)
78 : InfoBarDelegate(NULL), 78 : InfoBarDelegate(NULL),
79 google_url_tracker_(google_url_tracker), 79 google_url_tracker_(google_url_tracker),
80 new_google_url_(new_google_url) { 80 new_google_url_(new_google_url) {
81 } 81 }
82 82
83 TestInfoBarDelegate::~TestInfoBarDelegate() { 83 TestInfoBarDelegate::~TestInfoBarDelegate() {
84 } 84 }
85 85
86 InfoBar* TestInfoBarDelegate::CreateInfoBar() { 86 InfoBar* TestInfoBarDelegate::CreateInfoBar(TabContentsWrapper* owner) {
87 return NULL; 87 return NULL;
88 } 88 }
89 89
90 InfoBarDelegate* CreateTestInfobar( 90 InfoBarDelegate* CreateTestInfobar(
91 TabContents* tab_contents, 91 TabContents* tab_contents,
92 GoogleURLTracker* google_url_tracker, 92 GoogleURLTracker* google_url_tracker,
93 const GURL& new_google_url) { 93 const GURL& new_google_url) {
94 return new TestInfoBarDelegate(google_url_tracker, new_google_url); 94 return new TestInfoBarDelegate(google_url_tracker, new_google_url);
95 } 95 }
96 96
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 NavEntryCommitted(); 442 NavEntryCommitted();
443 EXPECT_TRUE(InfoBarIsShown()); 443 EXPECT_TRUE(InfoBarIsShown());
444 444
445 AcceptGoogleURL(); 445 AcceptGoogleURL();
446 InfoBarClosed(); 446 InfoBarClosed();
447 EXPECT_FALSE(InfoBarIsShown()); 447 EXPECT_FALSE(InfoBarIsShown());
448 EXPECT_EQ(GURL("http://www.google.co.jp/"), GoogleURLTracker::GoogleURL()); 448 EXPECT_EQ(GURL("http://www.google.co.jp/"), GoogleURLTracker::GoogleURL());
449 EXPECT_EQ(GURL("http://www.google.co.jp/"), GetLastPromptedGoogleURL()); 449 EXPECT_EQ(GURL("http://www.google.co.jp/"), GetLastPromptedGoogleURL());
450 EXPECT_TRUE(observer_->notified()); 450 EXPECT_TRUE(observer_->notified());
451 } 451 }
OLDNEW
« no previous file with comments | « chrome/browser/external_tab_container_win.h ('k') | chrome/browser/tab_contents/confirm_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698