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/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 #include "base/metrics/histogram_base.h" | 9 #include "base/metrics/histogram_base.h" |
10 #include "base/metrics/histogram_samples.h" | 10 #include "base/metrics/histogram_samples.h" |
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1460 // Install a new theme. | 1460 // Install a new theme. |
1461 ASSERT_NO_FATAL_FAILURE(InstallThemeAndVerify("theme2", "snowflake theme")); | 1461 ASSERT_NO_FATAL_FAILURE(InstallThemeAndVerify("theme2", "snowflake theme")); |
1462 | 1462 |
1463 // Confirm that new tab is notified about the theme changed event. | 1463 // Confirm that new tab is notified about the theme changed event. |
1464 on_theme_changed_calls = 0; | 1464 on_theme_changed_calls = 0; |
1465 EXPECT_TRUE(GetIntFromJS(active_tab, "onThemeChangedCalls", | 1465 EXPECT_TRUE(GetIntFromJS(active_tab, "onThemeChangedCalls", |
1466 &on_theme_changed_calls)); | 1466 &on_theme_changed_calls)); |
1467 EXPECT_EQ(2, on_theme_changed_calls); | 1467 EXPECT_EQ(2, on_theme_changed_calls); |
1468 } | 1468 } |
1469 | 1469 |
1470 // Flaky on Mac Tests bot. | 1470 // Flaky on Mac and Linux Tests bots. |
1471 #if defined(OS_MACOSX) | 1471 #if defined(OS_MACOSX) || defined(OS_LINUX) |
1472 #define MAYBE_UpdateSearchQueryOnBackNavigation DISABLED_UpdateSearchQueryOnBack
Navigation | 1472 #define MAYBE_UpdateSearchQueryOnBackNavigation DISABLED_UpdateSearchQueryOnBack
Navigation |
1473 #else | 1473 #else |
1474 #define MAYBE_UpdateSearchQueryOnBackNavigation UpdateSearchQueryOnBackNavigatio
n | 1474 #define MAYBE_UpdateSearchQueryOnBackNavigation UpdateSearchQueryOnBackNavigatio
n |
1475 #endif | 1475 #endif |
1476 // Test to verify that the omnibox search query is updated on browser | 1476 // Test to verify that the omnibox search query is updated on browser |
1477 // back button press event. | 1477 // back button press event. |
1478 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, | 1478 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, |
1479 MAYBE_UpdateSearchQueryOnBackNavigation) { | 1479 MAYBE_UpdateSearchQueryOnBackNavigation) { |
1480 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); | 1480 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); |
1481 | 1481 |
(...skipping 30 matching lines...) Expand all Loading... |
1512 active_tab->GetController().GoBack(); | 1512 active_tab->GetController().GoBack(); |
1513 load_stop_observer.Wait(); | 1513 load_stop_observer.Wait(); |
1514 | 1514 |
1515 EXPECT_EQ(ASCIIToUTF16("flowers"), omnibox()->GetText()); | 1515 EXPECT_EQ(ASCIIToUTF16("flowers"), omnibox()->GetText()); |
1516 // Commit the search by pressing 'Enter'. | 1516 // Commit the search by pressing 'Enter'. |
1517 FocusOmnibox(); | 1517 FocusOmnibox(); |
1518 PressEnterAndWaitForNavigation(); | 1518 PressEnterAndWaitForNavigation(); |
1519 EXPECT_EQ(ASCIIToUTF16("flowers"), omnibox()->GetText()); | 1519 EXPECT_EQ(ASCIIToUTF16("flowers"), omnibox()->GetText()); |
1520 } | 1520 } |
1521 | 1521 |
1522 // Flaky on Mac Tests bot. | 1522 // Flaky on Mac and Linux Tests bots. |
1523 #if defined(OS_MACOSX) | 1523 #if defined(OS_MACOSX) || defined(OS_LINUX) |
1524 #define MAYBE_UpdateSearchQueryOnForwardNavigation DISABLED_UpdateSearchQueryOnF
orwardNavigation | 1524 #define MAYBE_UpdateSearchQueryOnForwardNavigation DISABLED_UpdateSearchQueryOnF
orwardNavigation |
1525 #else | 1525 #else |
1526 #define MAYBE_UpdateSearchQueryOnForwardNavigation UpdateSearchQueryOnForwardNav
igation | 1526 #define MAYBE_UpdateSearchQueryOnForwardNavigation UpdateSearchQueryOnForwardNav
igation |
1527 #endif | 1527 #endif |
1528 // Test to verify that the omnibox search query is updated on browser | 1528 // Test to verify that the omnibox search query is updated on browser |
1529 // forward button press events. | 1529 // forward button press events. |
1530 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, | 1530 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, |
1531 MAYBE_UpdateSearchQueryOnForwardNavigation) { | 1531 MAYBE_UpdateSearchQueryOnForwardNavigation) { |
1532 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); | 1532 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); |
1533 | 1533 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1632 content::WindowedNotificationObserver load_stop_observer_2( | 1632 content::WindowedNotificationObserver load_stop_observer_2( |
1633 content::NOTIFICATION_LOAD_STOP, | 1633 content::NOTIFICATION_LOAD_STOP, |
1634 content::Source<content::NavigationController>( | 1634 content::Source<content::NavigationController>( |
1635 &active_tab->GetController())); | 1635 &active_tab->GetController())); |
1636 active_tab->GetController().GoBack(); | 1636 active_tab->GetController().GoBack(); |
1637 load_stop_observer_2.Wait(); | 1637 load_stop_observer_2.Wait(); |
1638 | 1638 |
1639 active_tab = browser()->tab_strip_model()->GetActiveWebContents(); | 1639 active_tab = browser()->tab_strip_model()->GetActiveWebContents(); |
1640 EXPECT_TRUE(chrome::IsInstantNTP(active_tab)); | 1640 EXPECT_TRUE(chrome::IsInstantNTP(active_tab)); |
1641 } | 1641 } |
OLD | NEW |