Home | History | Annotate | Download | only in instant

Lines Matching defs:instant

11 #include "chrome/browser/instant/instant_controller.h"
12 #include "chrome/browser/instant/instant_loader.h"
13 #include "chrome/browser/instant/instant_loader_manager.h"
61 "http://%s:%d/files/instant/%s?q={searchTerms}",
82 return browser()->instant()->GetPendingPreviewContents();
85 // Type a character to get instant to trigger.
95 InstantController* instant = browser()->instant();
96 ASSERT_TRUE(instant);
98 instant->GetPreviewContents() : GetPendingPreviewContents();
105 // Wait for instant to load and ensure it is in the state we expect.
110 ASSERT_TRUE(browser()->instant()->IsShowingInstant());
111 ASSERT_FALSE(browser()->instant()->is_displayable());
112 ASSERT_TRUE(browser()->instant()->is_active());
128 return browser()->instant()->loader_manager_->
332 browser()->instant()->GetCurrentURL().spec());
427 // Verify instant preview is shown correctly for a non-search query.
431 GURL url(test_server()->GetURL("files/instant/empty.html"));
434 ASSERT_TRUE(browser()->instant()->is_active());
435 ASSERT_TRUE(browser()->instant()->is_displayable());
436 ASSERT_TRUE(browser()->instant()->IsCurrent());
437 ASSERT_TRUE(browser()->instant
439 browser()->instant()->GetPreviewContents()->tab_contents()->
450 GURL url(test_server()->GetURL("files/instant/empty.html"));
453 ASSERT_TRUE(browser()->instant()->is_active());
454 ASSERT_TRUE(browser()->instant()->is_displayable());
455 TabContentsWrapper* initial_tab = browser()->instant()->GetPreviewContents();
470 // instant. As a result the tabcontents should not have changed.
471 TabContentsWrapper* current_tab = browser()->instant()->GetPreviewContents();
479 // page supports instant and hasn't actually commited yet.
480 EXPECT_TRUE(browser()->instant()->MightSupportInstant());
482 // Instant should still be active.
483 EXPECT_TRUE(browser()->instant()->is_active());
484 EXPECT_TRUE(browser()->instant()->is_displayable());
486 // Because we're waiting on the page, instant isn't current.
487 ASSERT_FALSE(browser()->instant()->IsCurrent());
489 // Bounce a message to the renderer so that we know the instant has gotten a
490 // response back from the renderer as to whether the page supports instant.
505 ASSERT_TRUE(browser()->instant()->is_active());
506 ASSERT_TRUE(browser()->instant()->is_displayable());
507 TabContentsWrapper* new_tab = browser()->instant()->GetPreviewContents();
517 // Makes sure that if the server doesn't support the instant API we don't show
534 ASSERT_TRUE(browser()->instant());
535 // Because we typed in a search string we should think we're showing instant
537 EXPECT_TRUE(browser()->instant()->IsShowingInstant());
538 // But because we're waiting to determine if the page really supports instant
540 EXPECT_FALSE(browser()->instant()->is_displayable());
541 // But instant should still be active.
542 EXPECT_TRUE(browser()->instant()->is_active());
544 // When the response comes back that the page doesn't support instant the tab
547 EXPECT_FALSE(browser()->instant()->IsShowingInstant());
548 EXPECT_FALSE(browser()->instant()->is_displayable());
549 EXPECT_TRUE(browser()->instant()->is_active());
550 EXPECT_FALSE(browser()->instant()->IsCurrent());
554 // with the provider not supporting instant works (meaning we don't display
570 GURL url(test_server()->GetURL("files/instant/empty.html"));
573 ASSERT_TRUE(browser()->instant()->is_displayable());
574 ASSERT_TRUE(browser()->instant()->is_active());
575 TabContentsWrapper* initial_tab = browser()->instant()->GetPreviewContents();
585 // Instant should still be live.
586 ASSERT_TRUE(browser()->instant()->is_displayable());
587 ASSERT_TRUE(browser()->instant()->is_active());
588 // Because we typed in a search string we should think we're showing instant
590 EXPECT_TRUE(browser()->instant()->MightSupportInstant());
591 // Instant should not be current (it's still loading).
592 EXPECT_FALSE(browser()->instant()->IsCurrent());
594 // When the response comes back that the page doesn't support instant the tab
597 EXPECT_FALSE(browser()->instant()->IsShowingInstant());
598 EXPECT_FALSE(browser()->instant()->is_displayable());
599 // But because the omnibox is still open, instant should be active.
600 ASSERT_TRUE(browser()->instant()->is_active());
633 GURL url(test_server()->GetURL("files/instant/403.html"));
637 ASSERT_TRUE(browser()->instant()->GetPreviewContents());
638 ASSERT_TRUE(browser()->instant()->is_active());
639 ASSERT_FALSE(browser()->instant()->is_displayable());
641 // When instant sees the 403, it should close the tab.
643 ASSERT_FALSE(browser()->instant()->GetPreviewContents());
644 ASSERT_TRUE(browser()->instant()->is_active());
645 ASSERT_FALSE(browser()->instant()->is_displayable());
647 // Try loading another url on the server. Instant shouldn't create a new tab
649 GURL url2(test_server()->GetURL("files/instant/empty.html"));
651 ASSERT_FALSE(browser()->instant()->GetPreviewContents());
652 ASSERT_TRUE(browser()->instant()->is_active());
653 ASSERT_FALSE(browser()->instant()->is_displayable());
670 ASSERT_FALSE(browser()->instant()->GetPreviewContents());
671 ASSERT_FALSE(browser()->instant()->is_active());
699 ASSERT_FALSE(browser()->instant()->GetPreviewContents());
700 ASSERT_FALSE(browser()->instant()->is_active());
768 // Wait for notification that the instant API has been determined.
781 GURL url(test_server()->GetURL("files/instant/empty.html"));
785 url = test_server()->GetURL("files/instant/download.zip");
787 // Wait for the load to fail (because instant disables downloads).
827 ASSERT_FALSE(browser()->instant()->GetPreviewContents());
828 ASSERT_FALSE(browser()->instant()->is_active());
836 GURL(test_server()->GetURL("files/instant/empty.html")));