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

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

Issue 10984047: Revert 158513 - Maybe fix InstantTest.NewWindowDismissesInstant on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/stringprintf.h" 5 #include "base/stringprintf.h"
6 #include "chrome/browser/content_settings/host_content_settings_map.h" 6 #include "chrome/browser/content_settings/host_content_settings_map.h"
7 #include "chrome/browser/history/history_service_factory.h" 7 #include "chrome/browser/history/history_service_factory.h"
8 #include "chrome/browser/instant/instant_controller.h" 8 #include "chrome/browser/instant/instant_controller.h"
9 #include "chrome/browser/instant/instant_loader.h" 9 #include "chrome/browser/instant/instant_loader.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 base::Bind(&KeywordQueryDone, &run_loop3, &queries)); 814 base::Bind(&KeywordQueryDone, &run_loop3, &queries));
815 run_loop3.Run(); 815 run_loop3.Run();
816 ASSERT_TRUE(queries.size()); 816 ASSERT_TRUE(queries.size());
817 EXPECT_EQ(ASCIIToUTF16("search"), queries[0]); 817 EXPECT_EQ(ASCIIToUTF16("search"), queries[0]);
818 } 818 }
819 819
820 // Test that creating a new window hides any currently showing Instant preview. 820 // Test that creating a new window hides any currently showing Instant preview.
821 IN_PROC_BROWSER_TEST_F(InstantTest, NewWindowDismissesInstant) { 821 IN_PROC_BROWSER_TEST_F(InstantTest, NewWindowDismissesInstant) {
822 ASSERT_NO_FATAL_FAILURE(SetupInstant("instant.html")); 822 ASSERT_NO_FATAL_FAILURE(SetupInstant("instant.html"));
823 EXPECT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); 823 EXPECT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
824 base::RunLoop().RunUntilIdle();
825 SetOmniboxTextAndWaitForInstantToShow("search"); 824 SetOmniboxTextAndWaitForInstantToShow("search");
826 825
827 Browser* previous_window = browser(); 826 Browser* previous_window = browser();
828 EXPECT_TRUE(instant()->IsCurrent()); 827 EXPECT_TRUE(instant()->IsCurrent());
829 EXPECT_TRUE(instant()->is_showing()); 828 EXPECT_TRUE(instant()->is_showing());
830 829
831 content::WindowedNotificationObserver instant_hidden_observer( 830 content::WindowedNotificationObserver instant_hidden_observer(
832 chrome::NOTIFICATION_INSTANT_CONTROLLER_HIDDEN, 831 chrome::NOTIFICATION_INSTANT_CONTROLLER_HIDDEN,
833 content::NotificationService::AllSources()); 832 content::NotificationService::AllSources());
834 chrome::NewEmptyWindow(browser()->profile()); 833 chrome::NewEmptyWindow(browser()->profile());
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 EXPECT_EQ(WideToUTF16(L"\u0130NSTANT"), omnibox()->GetText()); 905 EXPECT_EQ(WideToUTF16(L"\u0130NSTANT"), omnibox()->GetText());
907 906
908 instant()->Hide(); 907 instant()->Hide();
909 SetOmniboxTextAndWaitForInstantToShow("in"); 908 SetOmniboxTextAndWaitForInstantToShow("in");
910 EXPECT_EQ(ASCIIToUTF16("in"), omnibox()->GetText()); 909 EXPECT_EQ(ASCIIToUTF16("in"), omnibox()->GetText());
911 910
912 instant()->Hide(); 911 instant()->Hide();
913 SetOmniboxTextAndWaitForInstantToShow("IN"); 912 SetOmniboxTextAndWaitForInstantToShow("IN");
914 EXPECT_EQ(ASCIIToUTF16("IN"), omnibox()->GetText()); 913 EXPECT_EQ(ASCIIToUTF16("IN"), omnibox()->GetText());
915 } 914 }
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