| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 ui_test_utils::NavigateToURL(browser(), urls[i]); | 294 ui_test_utils::NavigateToURL(browser(), urls[i]); |
| 295 EXPECT_EQ(1, FindInPageASCII(web_contents, "cat", | 295 EXPECT_EQ(1, FindInPageASCII(web_contents, "cat", |
| 296 kFwd, kIgnoreCase, NULL)); | 296 kFwd, kIgnoreCase, NULL)); |
| 297 EXPECT_EQ(0, FindInPageASCII(web_contents, "bat", | 297 EXPECT_EQ(0, FindInPageASCII(web_contents, "bat", |
| 298 kFwd, kIgnoreCase, NULL)); | 298 kFwd, kIgnoreCase, NULL)); |
| 299 } | 299 } |
| 300 } | 300 } |
| 301 | 301 |
| 302 // Verify search for text within special URLs such as chrome:history, | 302 // Verify search for text within special URLs such as chrome:history, |
| 303 // chrome://downloads, data directory | 303 // chrome://downloads, data directory |
| 304 #if defined(OS_MACOSX) | 304 #if defined(OS_MACOSX) || defined(OS_WIN) |
| 305 // Disabled due to http://crbug.com/419987 | 305 // Disabled on Mac due to http://crbug.com/419987 |
| 306 // Disabled on Win due to http://crbug.com/661013 |
| 306 #define MAYBE_SearchWithinSpecialURL \ | 307 #define MAYBE_SearchWithinSpecialURL \ |
| 307 DISABLED_SearchWithinSpecialURL | 308 DISABLED_SearchWithinSpecialURL |
| 308 #else | 309 #else |
| 309 #define MAYBE_SearchWithinSpecialURL \ | 310 #define MAYBE_SearchWithinSpecialURL \ |
| 310 SearchWithinSpecialURL | 311 SearchWithinSpecialURL |
| 311 #endif | 312 #endif |
| 312 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_SearchWithinSpecialURL) { | 313 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_SearchWithinSpecialURL) { |
| 313 // TODO(tsergeant): Get this test working on MD History, which loads very | 314 // TODO(tsergeant): Get this test working on MD History, which loads very |
| 314 // asynchronously and causes this test to fail. | 315 // asynchronously and causes this test to fail. |
| 315 MdHistoryUI::SetEnabledForTesting(false); | 316 MdHistoryUI::SetEnabledForTesting(false); |
| (...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1558 | 1559 |
| 1559 EXPECT_TRUE(chrome::ExecuteCommand(browser_incognito, IDC_FIND_NEXT)); | 1560 EXPECT_TRUE(chrome::ExecuteCommand(browser_incognito, IDC_FIND_NEXT)); |
| 1560 WebContents* web_contents_incognito = | 1561 WebContents* web_contents_incognito = |
| 1561 browser_incognito->tab_strip_model()->GetActiveWebContents(); | 1562 browser_incognito->tab_strip_model()->GetActiveWebContents(); |
| 1562 ui_test_utils::FindInPageNotificationObserver observer( | 1563 ui_test_utils::FindInPageNotificationObserver observer( |
| 1563 web_contents_incognito); | 1564 web_contents_incognito); |
| 1564 observer.Wait(); | 1565 observer.Wait(); |
| 1565 EXPECT_EQ(ASCIIToUTF16("bar"), | 1566 EXPECT_EQ(ASCIIToUTF16("bar"), |
| 1566 GetFindBarTextForBrowser(browser_incognito)); | 1567 GetFindBarTextForBrowser(browser_incognito)); |
| 1567 } | 1568 } |
| OLD | NEW |