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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_browsertest.cc

Issue 8572015: Mark AutocompleteBrowserTest.FocusSearch flaky on Windows and Linux. (reland) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use OS_WIN, not OS_WINDOWS. Created 9 years, 1 month 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) 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 "base/format_macros.h" 5 #include "base/format_macros.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/autocomplete/autocomplete.h" 9 #include "chrome/browser/autocomplete/autocomplete.h"
10 #include "chrome/browser/autocomplete/autocomplete_edit.h" 10 #include "chrome/browser/autocomplete/autocomplete_edit.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 content::PAGE_TRANSITION_START_PAGE); 163 content::PAGE_TRANSITION_START_PAGE);
164 observer.Wait(); 164 observer.Wait();
165 EXPECT_EQ(UTF8ToUTF16(chrome::kAboutBlankURL), 165 EXPECT_EQ(UTF8ToUTF16(chrome::kAboutBlankURL),
166 location_bar->location_entry()->GetText()); 166 location_bar->location_entry()->GetText());
167 browser()->CloseTab(); 167 browser()->CloseTab();
168 EXPECT_EQ(UTF8ToUTF16(chrome::kAboutBlankURL), 168 EXPECT_EQ(UTF8ToUTF16(chrome::kAboutBlankURL),
169 location_bar->location_entry()->GetText()); 169 location_bar->location_entry()->GetText());
170 EXPECT_TRUE(location_bar->location_entry()->IsSelectAll()); 170 EXPECT_TRUE(location_bar->location_entry()->IsSelectAll());
171 } 171 }
172 172
173 IN_PROC_BROWSER_TEST_F(AutocompleteBrowserTest, FocusSearch) { 173 #if defined(OS_WIN) || defined(OS_LINUX)
174 // http://crbug.com/104307
175 #define MAYBE_FocusSearch FLAKY_FocusSearch
176 #else
177 #define MAYBE_FocusSearch FocusSearch
178 #endif
179 IN_PROC_BROWSER_TEST_F(AutocompleteBrowserTest, MAYBE_FocusSearch) {
174 LocationBar* location_bar = GetLocationBar(); 180 LocationBar* location_bar = GetLocationBar();
175 181
176 // Focus search when omnibox is blank 182 // Focus search when omnibox is blank
177 { 183 {
178 EXPECT_TRUE(location_bar->GetInputString().empty()); 184 EXPECT_TRUE(location_bar->GetInputString().empty());
179 EXPECT_EQ(UTF8ToUTF16(chrome::kAboutBlankURL), 185 EXPECT_EQ(UTF8ToUTF16(chrome::kAboutBlankURL),
180 location_bar->location_entry()->GetText()); 186 location_bar->location_entry()->GetText());
181 187
182 location_bar->FocusSearch(); 188 location_bar->FocusSearch();
183 EXPECT_TRUE(location_bar->GetInputString().empty()); 189 EXPECT_TRUE(location_bar->GetInputString().empty());
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 const AutocompleteResult& result = autocomplete_controller->result(); 326 const AutocompleteResult& result = autocomplete_controller->result();
321 // 'App test' is also a substring of extension 'Packaged App Test'. 327 // 'App test' is also a substring of extension 'Packaged App Test'.
322 EXPECT_GT(result.size(), 2U) << AutocompleteResultAsString(result); 328 EXPECT_GT(result.size(), 2U) << AutocompleteResultAsString(result);
323 AutocompleteMatch match = result.match_at(0); 329 AutocompleteMatch match = result.match_at(0);
324 EXPECT_EQ(ASCIIToUTF16("App Test"), match.contents); 330 EXPECT_EQ(ASCIIToUTF16("App Test"), match.contents);
325 EXPECT_EQ(AutocompleteMatch::EXTENSION_APP, match.type); 331 EXPECT_EQ(AutocompleteMatch::EXTENSION_APP, match.type);
326 EXPECT_FALSE(match.deletable); 332 EXPECT_FALSE(match.deletable);
327 location_bar->AcceptInput(); 333 location_bar->AcceptInput();
328 } 334 }
329 } 335 }
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