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

Side by Side Diff: chrome/browser/ui/search/instant_extended_interactive_uitest.cc

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <sstream> 5 #include <sstream>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/metrics/histogram_base.h" 9 #include "base/metrics/histogram_base.h"
10 #include "base/metrics/histogram_samples.h" 10 #include "base/metrics/histogram_samples.h"
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 // Show and commit the new overlay. 1149 // Show and commit the new overlay.
1150 ASSERT_TRUE(SetOmniboxTextAndWaitForOverlayToShow("hello again")); 1150 ASSERT_TRUE(SetOmniboxTextAndWaitForOverlayToShow("hello again"));
1151 EXPECT_EQ("hello again", GetOmniboxText()); 1151 EXPECT_EQ("hello again", GetOmniboxText());
1152 browser()->window()->GetLocationBar()->AcceptInput(); 1152 browser()->window()->GetLocationBar()->AcceptInput();
1153 content::WebContents* second_active_tab = 1153 content::WebContents* second_active_tab =
1154 browser()->tab_strip_model()->GetActiveWebContents(); 1154 browser()->tab_strip_model()->GetActiveWebContents();
1155 EXPECT_NE(first_active_tab, second_active_tab); 1155 EXPECT_NE(first_active_tab, second_active_tab);
1156 scoped_refptr<content::SiteInstance> second_site_instance = 1156 scoped_refptr<content::SiteInstance> second_site_instance =
1157 second_active_tab->GetSiteInstance(); 1157 second_active_tab->GetSiteInstance();
1158 EXPECT_NE(first_site_instance, second_site_instance); 1158 EXPECT_NE(first_site_instance, second_site_instance);
1159 EXPECT_FALSE(first_site_instance->IsRelatedSiteInstance( 1159 EXPECT_FALSE(
1160 second_site_instance)); 1160 first_site_instance->IsRelatedSiteInstance(second_site_instance.get()));
1161 } 1161 }
1162 1162
1163 // Tests that suggestions are sanity checked. 1163 // Tests that suggestions are sanity checked.
1164 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, ValidatesSuggestions) { 1164 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, ValidatesSuggestions) {
1165 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); 1165 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser()));
1166 FocusOmniboxAndWaitForInstantOverlayAndNTPSupport(); 1166 FocusOmniboxAndWaitForInstantOverlayAndNTPSupport();
1167 1167
1168 // Do not set gray text that is not a suffix of the query. 1168 // Do not set gray text that is not a suffix of the query.
1169 EXPECT_TRUE(ExecuteScript("suggestion = 'potato';" 1169 EXPECT_TRUE(ExecuteScript("suggestion = 'potato';"
1170 "behavior = 2;")); 1170 "behavior = 2;"));
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after
2650 2650
2651 // Test that if the LogDropdownShown() call records a histogram value. 2651 // Test that if the LogDropdownShown() call records a histogram value.
2652 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, LogDropdownShown) { 2652 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, LogDropdownShown) {
2653 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); 2653 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser()));
2654 FocusOmniboxAndWaitForInstantOverlayAndNTPSupport(); 2654 FocusOmniboxAndWaitForInstantOverlayAndNTPSupport();
2655 int64 histogramValue = GetHistogramCount("Instant.TimeToFirstShowFromWeb"); 2655 int64 histogramValue = GetHistogramCount("Instant.TimeToFirstShowFromWeb");
2656 ASSERT_TRUE(SetOmniboxTextAndWaitForOverlayToShow("a")); 2656 ASSERT_TRUE(SetOmniboxTextAndWaitForOverlayToShow("a"));
2657 EXPECT_EQ(histogramValue + 1, 2657 EXPECT_EQ(histogramValue + 1,
2658 GetHistogramCount("Instant.TimeToFirstShowFromWeb")); 2658 GetHistogramCount("Instant.TimeToFirstShowFromWeb"));
2659 } 2659 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/instant_controller.cc ('k') | chrome/browser/ui/startup/startup_browser_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698