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 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, SearchDoesntReuseInstantTab) { | 310 // Flaky on Windows in the CQ: https://crbug.com/678975 |
| 311 #if defined(OS_WIN) |
| 312 #define MAYBE_SearchDoesntReuseInstantTab DISABLED_SearchDoesntReuseInstantTab |
| 313 #else |
| 314 #define MAYBE_SearchDoesntReuseInstantTab SearchDoesntReuseInstantTab |
| 315 #endif |
| 316 IN_PROC_BROWSER_TEST_F(InstantExtendedTest, MAYBE_SearchDoesntReuseInstantTab) { |
311 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); | 317 ASSERT_NO_FATAL_FAILURE(SetupInstant(browser())); |
312 FocusOmnibox(); | 318 FocusOmnibox(); |
313 | 319 |
314 SetOmniboxText("flowers"); | 320 SetOmniboxText("flowers"); |
315 PressEnterAndWaitForFrameLoad(); | 321 PressEnterAndWaitForFrameLoad(); |
316 | 322 |
317 // Just did a regular search. | 323 // Just did a regular search. |
318 content::WebContents* active_tab = | 324 content::WebContents* active_tab = |
319 browser()->tab_strip_model()->GetActiveWebContents(); | 325 browser()->tab_strip_model()->GetActiveWebContents(); |
320 ASSERT_THAT(active_tab->GetURL().spec(), HasSubstr("q=flowers")); | 326 ASSERT_THAT(active_tab->GetURL().spec(), HasSubstr("q=flowers")); |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 stream << "link.href = \"" << result_url.spec() << "\";"; | 733 stream << "link.href = \"" << result_url.spec() << "\";"; |
728 stream << "document.body.appendChild(link);"; | 734 stream << "document.body.appendChild(link);"; |
729 stream << "link.click();"; | 735 stream << "link.click();"; |
730 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); | 736 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); |
731 | 737 |
732 content::WaitForLoadStop(contents); | 738 content::WaitForLoadStop(contents); |
733 std::string expected_title = | 739 std::string expected_title = |
734 "Referrer is " + instant_url().GetWithEmptyPath().spec(); | 740 "Referrer is " + instant_url().GetWithEmptyPath().spec(); |
735 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); | 741 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); |
736 } | 742 } |
OLD | NEW |