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

Unified Diff: chrome/browser/instant/instant_test_utils.cc

Issue 12387089: Instant: Rename 'preview' to 'overlay' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/instant/instant_test_utils.h ('k') | chrome/browser/resources/instant/instant.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_test_utils.cc
diff --git a/chrome/browser/instant/instant_test_utils.cc b/chrome/browser/instant/instant_test_utils.cc
index eb288bcef31f7bdcfab38934211325c931b6ccc0..242db0b05bff31c20faf248c7d7058342eb7b484 100644
--- a/chrome/browser/instant/instant_test_utils.cc
+++ b/chrome/browser/instant/instant_test_utils.cc
@@ -28,7 +28,7 @@ std::string WrapScript(const std::string& script) {
// InstantTestModelObserver --------------------------------------------------
InstantTestModelObserver::InstantTestModelObserver(
- InstantModel* model,
+ InstantOverlayModel* model,
chrome::search::Mode::Type desired_mode_type)
: model_(model),
desired_mode_type_(desired_mode_type) {
@@ -39,11 +39,12 @@ InstantTestModelObserver::~InstantTestModelObserver() {
model_->RemoveObserver(this);
}
-void InstantTestModelObserver::WaitUntilDesiredPreviewState() {
+void InstantTestModelObserver::WaitForDesiredOverlayState() {
run_loop_.Run();
}
-void InstantTestModelObserver::PreviewStateChanged(const InstantModel& model) {
+void InstantTestModelObserver::OverlayStateChanged(
+ const InstantOverlayModel& model) {
if (model.mode().mode == desired_mode_type_)
run_loop_.Quit();
}
@@ -76,7 +77,7 @@ void InstantTestBase::SetupInstant() {
void InstantTestBase::KillInstantRenderView() {
base::KillProcess(
- instant()->GetPreviewContents()->GetRenderProcessHost()->GetHandle(),
+ instant()->GetOverlayContents()->GetRenderProcessHost()->GetHandle(),
content::RESULT_CODE_KILLED,
false);
}
@@ -96,12 +97,12 @@ void InstantTestBase::SetOmniboxText(const std::string& text) {
omnibox()->SetUserText(UTF8ToUTF16(text));
}
-void InstantTestBase::SetOmniboxTextAndWaitForInstantToShow(
+void InstantTestBase::SetOmniboxTextAndWaitForOverlayToShow(
const std::string& text) {
InstantTestModelObserver observer(
instant()->model(), chrome::search::Mode::MODE_SEARCH_SUGGESTIONS);
SetOmniboxText(text);
- observer.WaitUntilDesiredPreviewState();
+ observer.WaitForDesiredOverlayState();
}
bool InstantTestBase::GetBoolFromJS(content::WebContents* contents,
@@ -126,7 +127,7 @@ bool InstantTestBase::GetStringFromJS(content::WebContents* contents,
}
bool InstantTestBase::ExecuteScript(const std::string& script) {
- return content::ExecuteScript(instant()->GetPreviewContents(), script);
+ return content::ExecuteScript(instant()->GetOverlayContents(), script);
}
bool InstantTestBase::CheckVisibilityIs(content::WebContents* contents,
« no previous file with comments | « chrome/browser/instant/instant_test_utils.h ('k') | chrome/browser/resources/instant/instant.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698