OLD | NEW |
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/histogram_base.h" | 8 #include "base/metrics/histogram_base.h" |
9 #include "base/metrics/histogram_samples.h" | 9 #include "base/metrics/histogram_samples.h" |
10 #include "base/metrics/statistics_recorder.h" | 10 #include "base/metrics/statistics_recorder.h" |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 // Install a new theme. | 586 // Install a new theme. |
587 ASSERT_NO_FATAL_FAILURE(InstallThemeAndVerify("theme2", "snowflake theme")); | 587 ASSERT_NO_FATAL_FAILURE(InstallThemeAndVerify("theme2", "snowflake theme")); |
588 | 588 |
589 // Confirm that new tab is notified about the theme changed event. | 589 // Confirm that new tab is notified about the theme changed event. |
590 on_theme_changed_calls = 0; | 590 on_theme_changed_calls = 0; |
591 EXPECT_TRUE(GetIntFromJS(active_tab, "onThemeChangedCalls", | 591 EXPECT_TRUE(GetIntFromJS(active_tab, "onThemeChangedCalls", |
592 &on_theme_changed_calls)); | 592 &on_theme_changed_calls)); |
593 EXPECT_EQ(2, on_theme_changed_calls); | 593 EXPECT_EQ(2, on_theme_changed_calls); |
594 } | 594 } |
595 | 595 |
596 // Flaky on Mac and Linux Tests bots. | 596 // Flaky on all bots. http://crbug.com/253092 |
597 #if defined(OS_MACOSX) || defined(OS_LINUX) | |
598 #define MAYBE_UpdateSearchQueryOnBackNavigation DISABLED_UpdateSearchQueryOnBack
Navigation | |
599 #else | |
600 #define MAYBE_UpdateSearchQueryOnBackNavigation UpdateSearchQueryOnBackNavigatio
n | |
601 #endif | |
602 // Test to verify that the omnibox search query is updated on browser | 597 // Test to verify that the omnibox search query is updated on browser |
603 // back button press event. | 598 // back button press event. |
604 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, | 599 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, |
605 MAYBE_UpdateSearchQueryOnBackNavigation) { | 600 DISABLED_UpdateSearchQueryOnBackNavigation) { |
606 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); | 601 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); |
607 | 602 |
608 // Focus omnibox and confirm overlay isn't shown. | 603 // Focus omnibox and confirm overlay isn't shown. |
609 FocusOmnibox(); | 604 FocusOmnibox(); |
610 | 605 |
611 // Create an observer to wait for the instant tab to support Instant. | 606 // Create an observer to wait for the instant tab to support Instant. |
612 content::WindowedNotificationObserver observer( | 607 content::WindowedNotificationObserver observer( |
613 chrome::NOTIFICATION_INSTANT_TAB_SUPPORT_DETERMINED, | 608 chrome::NOTIFICATION_INSTANT_TAB_SUPPORT_DETERMINED, |
614 content::NotificationService::AllSources()); | 609 content::NotificationService::AllSources()); |
615 | 610 |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 stream << "link.href = \"" << result_url.spec() << "\";"; | 970 stream << "link.href = \"" << result_url.spec() << "\";"; |
976 stream << "document.body.appendChild(link);"; | 971 stream << "document.body.appendChild(link);"; |
977 stream << "link.click();"; | 972 stream << "link.click();"; |
978 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); | 973 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); |
979 | 974 |
980 content::WaitForLoadStop(contents); | 975 content::WaitForLoadStop(contents); |
981 std::string expected_title = | 976 std::string expected_title = |
982 "Referrer is " + instant_url().GetWithEmptyPath().spec(); | 977 "Referrer is " + instant_url().GetWithEmptyPath().spec(); |
983 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); | 978 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); |
984 } | 979 } |
OLD | NEW |