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

Side by Side Diff: chrome/browser/extensions/browser_action_apitest.cc

Issue 6250028: Mark BrowserActionApiTest.BrowserActionPopup flaky. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 // Go back to first tab, changed title should reappear. 137 // Go back to first tab, changed title should reappear.
138 browser()->SelectTabContentsAt(0, true); 138 browser()->SelectTabContentsAt(0, true);
139 EXPECT_EQ("Showing icon 2", GetBrowserActionsBar().GetTooltip(0)); 139 EXPECT_EQ("Showing icon 2", GetBrowserActionsBar().GetTooltip(0));
140 140
141 // Reload that tab, default title should come back. 141 // Reload that tab, default title should come back.
142 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); 142 ui_test_utils::NavigateToURL(browser(), GURL("about:blank"));
143 EXPECT_EQ("hi!", GetBrowserActionsBar().GetTooltip(0)); 143 EXPECT_EQ("hi!", GetBrowserActionsBar().GetTooltip(0));
144 } 144 }
145 145
146 IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, BrowserActionPopup) { 146 // http://code.google.com/p/chromium/issues/detail?id=70829
147 // Only mac is okay.
148 #if !defined(OS_MACOSX)
149 #define MAYBE_BrowserActionPopup FLAKY_BrowserActionPopup
150 #else
151 #define MAYBE_BrowserActionPopup BrowserActionPopup
152 #endif
153 IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, MAYBE_BrowserActionPopup) {
147 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII( 154 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII(
148 "browser_action/popup"))); 155 "browser_action/popup")));
149 BrowserActionTestUtil actions_bar = GetBrowserActionsBar(); 156 BrowserActionTestUtil actions_bar = GetBrowserActionsBar();
150 const Extension* extension = GetSingleLoadedExtension(); 157 const Extension* extension = GetSingleLoadedExtension();
151 ASSERT_TRUE(extension) << message_; 158 ASSERT_TRUE(extension) << message_;
152 159
153 // The extension's popup's size grows by |growFactor| each click. 160 // The extension's popup's size grows by |growFactor| each click.
154 const int growFactor = 500; 161 const int growFactor = 500;
155 gfx::Size minSize = BrowserActionTestUtil::GetMinPopupSize(); 162 gfx::Size minSize = BrowserActionTestUtil::GetMinPopupSize();
156 gfx::Size middleSize = gfx::Size(growFactor, growFactor); 163 gfx::Size middleSize = gfx::Size(growFactor, growFactor);
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 service->toolbar_model()->MoveBrowserAction( 369 service->toolbar_model()->MoveBrowserAction(
363 service->extensions()->at(size_before + 1), 1); 370 service->extensions()->at(size_before + 1), 1);
364 371
365 EXPECT_EQ(kTooltipC, GetBrowserActionsBar().GetTooltip(0)); 372 EXPECT_EQ(kTooltipC, GetBrowserActionsBar().GetTooltip(0));
366 EXPECT_EQ(kTooltipB, GetBrowserActionsBar().GetTooltip(1)); 373 EXPECT_EQ(kTooltipB, GetBrowserActionsBar().GetTooltip(1));
367 EXPECT_EQ(kTooltipA, GetBrowserActionsBar().GetTooltip(2)); 374 EXPECT_EQ(kTooltipA, GetBrowserActionsBar().GetTooltip(2));
368 375
369 EXPECT_EQ(kTooltipC, incognito_bar.GetTooltip(0)); 376 EXPECT_EQ(kTooltipC, incognito_bar.GetTooltip(0));
370 EXPECT_EQ(kTooltipA, incognito_bar.GetTooltip(1)); 377 EXPECT_EQ(kTooltipA, incognito_bar.GetTooltip(1));
371 } 378 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698