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

Unified Diff: chrome/browser/ui/sync/one_click_signin_bubble_links_delegate_browsertest.cc

Issue 18558009: Fix flaky test OneClickSigninBubbleViewBrowserTest::ShowBubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/sync/one_click_signin_bubble_links_delegate_browsertest.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_bubble_links_delegate_browsertest.cc b/chrome/browser/ui/sync/one_click_signin_bubble_links_delegate_browsertest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4ffa307626eb1940548d2d6278bee2a0b9bb8e12
--- /dev/null
+++ b/chrome/browser/ui/sync/one_click_signin_bubble_links_delegate_browsertest.cc
@@ -0,0 +1,39 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.h"
+
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "chrome/test/base/in_process_browser_test.h"
+
+typedef InProcessBrowserTest OneClickSigninBubbleLinksDelegateBrowserTest;
+
+IN_PROC_BROWSER_TEST_F(OneClickSigninBubbleLinksDelegateBrowserTest,
+ AdvancedLink) {
+ scoped_ptr<OneClickSigninBubbleDelegate> delegate_;
+ delegate_.reset(new OneClickSigninBubbleLinksDelegate(browser()));
+
+ int starting_tab_count = browser()->tab_strip_model()->count();
+
+ // The current tab should be replaced.
+ delegate_->OnAdvancedLinkClicked();
+
+ int tab_count = browser()->tab_strip_model()->count();
+ EXPECT_EQ(starting_tab_count, tab_count);
+}
+
+IN_PROC_BROWSER_TEST_F(OneClickSigninBubbleLinksDelegateBrowserTest,
+ LearnMoreLink) {
+ scoped_ptr<OneClickSigninBubbleDelegate> delegate_;
+ delegate_.reset(new OneClickSigninBubbleLinksDelegate(browser()));
+
+ int starting_tab_count = browser()->tab_strip_model()->count();
+
+ // A new tab should be opened.
+ delegate_->OnLearnMoreLinkClicked(false);
+
+ int tab_count = browser()->tab_strip_model()->count();
+ EXPECT_EQ(starting_tab_count + 1, tab_count);
+}
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698