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

Side by Side Diff: chrome/browser/instant/instant_browsertest.cc

Issue 6254019: Disable SearchServerDoesntSupportInstant on mac. (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) 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/stringprintf.h" 6 #include "base/stringprintf.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" 8 #include "chrome/browser/autocomplete/autocomplete_edit_view.h"
9 #include "chrome/browser/browser_list.h" 9 #include "chrome/browser/browser_list.h"
10 #include "chrome/browser/browser_window.h" 10 #include "chrome/browser/browser_window.h"
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 ASSERT_NE(new_tab, initial_tab); 461 ASSERT_NE(new_tab, initial_tab);
462 RenderWidgetHostView* new_rwhv = 462 RenderWidgetHostView* new_rwhv =
463 new_tab->tab_contents()->GetRenderWidgetHostView(); 463 new_tab->tab_contents()->GetRenderWidgetHostView();
464 ASSERT_TRUE(new_rwhv); 464 ASSERT_TRUE(new_rwhv);
465 ASSERT_NE(new_rwhv, rwhv); 465 ASSERT_NE(new_rwhv, rwhv);
466 ASSERT_TRUE(new_rwhv->IsShowing()); 466 ASSERT_TRUE(new_rwhv->IsShowing());
467 } 467 }
468 468
469 // Makes sure that if the server doesn't support the instant API we don't show 469 // Makes sure that if the server doesn't support the instant API we don't show
470 // anything. 470 // anything.
471 IN_PROC_BROWSER_TEST_F(InstantTest, SearchServerDoesntSupportInstant) { 471 #if defined(OS_MACOSX)
472 // Showing as flaky on Mac
473 // http://crbug.com/70860
474 #define MAYBE_SearchServerDoesntSupportInstant \
475 DISABLED_SearchServerDoesntSupportInstant
476 #else
477 #define MAYBE_SearchServerDoesntSupportInstant \
478 SearchServerDoesntSupportInstant
479 #endif
480 IN_PROC_BROWSER_TEST_F(InstantTest, MAYBE_SearchServerDoesntSupportInstant) {
472 ASSERT_TRUE(test_server()->Start()); 481 ASSERT_TRUE(test_server()->Start());
473 ASSERT_NO_FATAL_FAILURE(SetupInstantProvider("empty.html")); 482 ASSERT_NO_FATAL_FAILURE(SetupInstantProvider("empty.html"));
474 ASSERT_NO_FATAL_FAILURE(FindLocationBar()); 483 ASSERT_NO_FATAL_FAILURE(FindLocationBar());
475 location_bar_->location_entry()->SetUserText(ASCIIToUTF16("a")); 484 location_bar_->location_entry()->SetUserText(ASCIIToUTF16("a"));
476 ASSERT_TRUE(browser()->instant()); 485 ASSERT_TRUE(browser()->instant());
477 // Because we typed in a search string we should think we're showing instant 486 // Because we typed in a search string we should think we're showing instant
478 // results. 487 // results.
479 EXPECT_TRUE(browser()->instant()->IsShowingInstant()); 488 EXPECT_TRUE(browser()->instant()->IsShowingInstant());
480 // But because we're waiting to determine if the page really supports instant 489 // But because we're waiting to determine if the page really supports instant
481 // we shouldn't be showing the preview. 490 // we shouldn't be showing the preview.
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 // Check that the preview contents have been committed. 678 // Check that the preview contents have been committed.
670 ASSERT_FALSE(browser()->instant()->GetPreviewContents()); 679 ASSERT_FALSE(browser()->instant()->GetPreviewContents());
671 ASSERT_FALSE(browser()->instant()->is_active()); 680 ASSERT_FALSE(browser()->instant()->is_active());
672 TabContents* contents = browser()->GetSelectedTabContents(); 681 TabContents* contents = browser()->GetSelectedTabContents();
673 ASSERT_TRUE(contents); 682 ASSERT_TRUE(contents);
674 683
675 // Check that the value is reflected and onsubmit is called. 684 // Check that the value is reflected and onsubmit is called.
676 EXPECT_EQ("true 1 0 2 2 a false abcdef true 6 6", 685 EXPECT_EQ("true 1 0 2 2 a false abcdef true 6 6",
677 GetSearchStateAsString(preview_)); 686 GetSearchStateAsString(preview_));
678 } 687 }
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