X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fbrowser%2Fui%2Fsearch%2Finstant_page_unittest.cc;h=6d85cfbe00efd10bcad71dd67d6d7aec78fb4809;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=4e2e4c2594836fb6304cdb8d3387345f12413e6a;hpb=4b53d56b8a1db20d4089f6d4f37126d43f907125;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/browser/ui/search/instant_page_unittest.cc b/src/chrome/browser/ui/search/instant_page_unittest.cc index 4e2e4c2..6d85cfb 100644 --- a/src/chrome/browser/ui/search/instant_page_unittest.cc +++ b/src/chrome/browser/ui/search/instant_page_unittest.cc @@ -43,7 +43,6 @@ class FakePageDelegate : public InstantPage::Delegate { content::PageTransition transition, WindowOpenDisposition disposition, bool is_search_type)); - MOCK_METHOD1(InstantPageLoadFailed, void(content::WebContents* contents)); }; } // namespace @@ -61,8 +60,6 @@ class InstantPageTest : public ChromeRenderViewHostTestHarness { }; void InstantPageTest::SetUp() { - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableInstantExtendedAPI); ChromeRenderViewHostTestHarness::SetUp(); SearchTabHelper::CreateForWebContents(web_contents()); } @@ -150,7 +147,7 @@ TEST_F(InstantPageTest, PageSupportsInstant) { // Assume the page supports instant. Invoke the message reply handler to make // sure the InstantPage is notified about the instant support state. const content::NavigationEntry* entry = - web_contents()->GetController().GetActiveEntry(); + web_contents()->GetController().GetLastCommittedEntry(); EXPECT_TRUE(entry); SearchTabHelper::FromWebContents(web_contents())->InstantSupportChanged(true); EXPECT_TRUE(page->supports_instant()); @@ -162,12 +159,6 @@ TEST_F(InstantPageTest, AppropriateMessagesSentToIncognitoPages) { NavigateAndCommit(GURL(chrome::kChromeSearchLocalNtpUrl)); process()->sink().ClearMessages(); - // Incognito pages should get these messages. - page->sender()->SetOmniboxBounds(gfx::Rect()); - EXPECT_TRUE(MessageWasSent(ChromeViewMsg_SearchBoxMarginChange::ID)); - page->sender()->ToggleVoiceSearch(); - EXPECT_TRUE(MessageWasSent(ChromeViewMsg_SearchBoxToggleVoiceSearch::ID)); - // Incognito pages should not get any others. page->sender()->FocusChanged( OMNIBOX_FOCUS_NONE, OMNIBOX_FOCUS_CHANGE_EXPLICIT);