OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/stringprintf.h" | 6 #include "base/stringprintf.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" | 8 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" |
9 #include "chrome/browser/browser_list.h" | 9 #include "chrome/browser/browser_list.h" |
10 #include "chrome/browser/browser_window.h" | 10 #include "chrome/browser/browser_window.h" |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 EXPECT_FALSE(browser()->instant()->IsCurrent()); | 492 EXPECT_FALSE(browser()->instant()->IsCurrent()); |
493 } | 493 } |
494 | 494 |
495 // Verifies transitioning from loading a non-search string to a search string | 495 // Verifies transitioning from loading a non-search string to a search string |
496 // with the provider not supporting instant works (meaning we don't display | 496 // with the provider not supporting instant works (meaning we don't display |
497 // anything). | 497 // anything). |
498 #if defined(OS_MACOSX) || defined(OS_LINUX) | 498 #if defined(OS_MACOSX) || defined(OS_LINUX) |
499 // Showing as flaky on Mac and linux (chrome os) | 499 // Showing as flaky on Mac and linux (chrome os) |
500 // http://crbug.com/70810 | 500 // http://crbug.com/70810 |
501 #define MAYBE_NonSearchToSearchDoesntSupportInstant \ | 501 #define MAYBE_NonSearchToSearchDoesntSupportInstant \ |
502 FLAKY_NonSearchToSearchDoesntSupportInstant | 502 DISABLED_NonSearchToSearchDoesntSupportInstant |
503 #else | 503 #else |
504 #define MAYBE_NonSearchToSearchDoesntSupportInstant \ | 504 #define MAYBE_NonSearchToSearchDoesntSupportInstant \ |
505 NonSearchToSearchDoesntSupportInstant | 505 NonSearchToSearchDoesntSupportInstant |
506 #endif | 506 #endif |
507 IN_PROC_BROWSER_TEST_F(InstantTest, | 507 IN_PROC_BROWSER_TEST_F(InstantTest, |
508 MAYBE_NonSearchToSearchDoesntSupportInstant) { | 508 MAYBE_NonSearchToSearchDoesntSupportInstant) { |
509 ASSERT_TRUE(test_server()->Start()); | 509 ASSERT_TRUE(test_server()->Start()); |
510 ASSERT_NO_FATAL_FAILURE(SetupInstantProvider("empty.html")); | 510 ASSERT_NO_FATAL_FAILURE(SetupInstantProvider("empty.html")); |
511 GURL url(test_server()->GetURL("files/instant/empty.html")); | 511 GURL url(test_server()->GetURL("files/instant/empty.html")); |
512 ASSERT_NO_FATAL_FAILURE(SetLocationBarText(UTF8ToWide(url.spec()))); | 512 ASSERT_NO_FATAL_FAILURE(SetLocationBarText(UTF8ToWide(url.spec()))); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 // Check that the preview contents have been committed. | 669 // Check that the preview contents have been committed. |
670 ASSERT_FALSE(browser()->instant()->GetPreviewContents()); | 670 ASSERT_FALSE(browser()->instant()->GetPreviewContents()); |
671 ASSERT_FALSE(browser()->instant()->is_active()); | 671 ASSERT_FALSE(browser()->instant()->is_active()); |
672 TabContents* contents = browser()->GetSelectedTabContents(); | 672 TabContents* contents = browser()->GetSelectedTabContents(); |
673 ASSERT_TRUE(contents); | 673 ASSERT_TRUE(contents); |
674 | 674 |
675 // Check that the value is reflected and onsubmit is called. | 675 // Check that the value is reflected and onsubmit is called. |
676 EXPECT_EQ("true 1 0 2 2 a false abcdef true 6 6", | 676 EXPECT_EQ("true 1 0 2 2 a false abcdef true 6 6", |
677 GetSearchStateAsString(preview_)); | 677 GetSearchStateAsString(preview_)); |
678 } | 678 } |
OLD | NEW |