| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 ThemeServiceFactory::GetThemeForProfile( | 300 ThemeServiceFactory::GetThemeForProfile( |
| 301 ExtensionBrowserTest::browser()->profile()); | 301 ExtensionBrowserTest::browser()->profile()); |
| 302 ASSERT_NE(static_cast<extensions::Extension*>(NULL), new_theme); | 302 ASSERT_NE(static_cast<extensions::Extension*>(NULL), new_theme); |
| 303 ASSERT_EQ(new_theme->name(), theme_name); | 303 ASSERT_EQ(new_theme->name(), theme_name); |
| 304 } | 304 } |
| 305 | 305 |
| 306 private: | 306 private: |
| 307 DISALLOW_COPY_AND_ASSIGN(InstantPolicyTest); | 307 DISALLOW_COPY_AND_ASSIGN(InstantPolicyTest); |
| 308 }; | 308 }; |
| 309 | 309 |
| 310 // Flaky on Windows in the CQ and Linux memory bot: https://crbug.com/678975 | 310 // TODO(https://crbug.com/678975): Flaky on memory bot (all platforms). |
| 311 #if defined(OS_WIN) || defined(OS_LINUX) | 311 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, |
| 312 #define MAYBE_SearchDoesntReuseInstantTab DISABLED_SearchDoesntReuseInstantTab | 312 DISABLED_SearchDoesntReuseInstantTab) { |
| 313 #else | |
| 314 #define MAYBE_SearchDoesntReuseInstantTab SearchDoesntReuseInstantTab | |
| 315 #endif | |
| 316 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, MAYBE_SearchDoesntReuseInstantTab) { | |
| 317 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); | 313 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); |
| 318 FocusOmnibox(); | 314 FocusOmnibox(); |
| 319 | 315 |
| 320 SetOmniboxText("flowers"); | 316 SetOmniboxText("flowers"); |
| 321 PressEnterAndWaitForFrameLoad(); | 317 PressEnterAndWaitForFrameLoad(); |
| 322 | 318 |
| 323 // Just did a regular search. | 319 // Just did a regular search. |
| 324 content::WebContents* active_tab = | 320 content::WebContents* active_tab = |
| 325 browser()->tab_strip_model()->GetActiveWebContents(); | 321 browser()->tab_strip_model()->GetActiveWebContents(); |
| 326 ASSERT_THAT(active_tab->GetURL().spec(), HasSubstr("q=flowers")); | 322 ASSERT_THAT(active_tab->GetURL().spec(), HasSubstr("q=flowers")); |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 stream << "link.href = \"" << result_url.spec() << "\";"; | 729 stream << "link.href = \"" << result_url.spec() << "\";"; |
| 734 stream << "document.body.appendChild(link);"; | 730 stream << "document.body.appendChild(link);"; |
| 735 stream << "link.click();"; | 731 stream << "link.click();"; |
| 736 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); | 732 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); |
| 737 | 733 |
| 738 content::WaitForLoadStop(contents); | 734 content::WaitForLoadStop(contents); |
| 739 std::string expected_title = | 735 std::string expected_title = |
| 740 "Referrer is " + instant_url().GetWithEmptyPath().spec(); | 736 "Referrer is " + instant_url().GetWithEmptyPath().spec(); |
| 741 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); | 737 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); |
| 742 } | 738 } |
| OLD | NEW |