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 "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "base/string16.h" | 7 #include "base/string16.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/common/cancelable_request.h" | 10 #include "chrome/browser/common/cancelable_request.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 ui_test_utils::NavigateToURL(browser(), urls[i]); | 274 ui_test_utils::NavigateToURL(browser(), urls[i]); |
275 EXPECT_EQ(1, FindInPageWchar(web_contents, L"cat", | 275 EXPECT_EQ(1, FindInPageWchar(web_contents, L"cat", |
276 kFwd, kIgnoreCase, NULL)); | 276 kFwd, kIgnoreCase, NULL)); |
277 EXPECT_EQ(0, FindInPageWchar(web_contents, L"bat", | 277 EXPECT_EQ(0, FindInPageWchar(web_contents, L"bat", |
278 kFwd, kIgnoreCase, NULL)); | 278 kFwd, kIgnoreCase, NULL)); |
279 } | 279 } |
280 } | 280 } |
281 | 281 |
282 // Verify search for text within special URLs such as chrome:history, | 282 // Verify search for text within special URLs such as chrome:history, |
283 // chrome://downloads, data directory | 283 // chrome://downloads, data directory |
284 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, SearchWithinSpecialURL) { | 284 // Disabled due to crbug.com/175711 |
| 285 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, |
| 286 DISABLED_SearchWithinSpecialURL) { |
285 WebContents* web_contents = | 287 WebContents* web_contents = |
286 browser()->tab_strip_model()->GetActiveWebContents(); | 288 browser()->tab_strip_model()->GetActiveWebContents(); |
287 | 289 |
288 base::FilePath data_dir = | 290 base::FilePath data_dir = |
289 ui_test_utils::GetTestFilePath(base::FilePath(), base::FilePath()); | 291 ui_test_utils::GetTestFilePath(base::FilePath(), base::FilePath()); |
290 ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL(data_dir)); | 292 ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL(data_dir)); |
291 EXPECT_EQ(1, FindInPageWchar(web_contents, L"downloads", | 293 EXPECT_EQ(1, FindInPageWchar(web_contents, L"downloads", |
292 kFwd, kIgnoreCase, NULL)); | 294 kFwd, kIgnoreCase, NULL)); |
293 | 295 |
294 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIHistoryURL)); | 296 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIHistoryURL)); |
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1495 content::RunAllPendingInMessageLoop(); // Needed on Linux. | 1497 content::RunAllPendingInMessageLoop(); // Needed on Linux. |
1496 EXPECT_TRUE(GetFindBarWindowInfo(&position, NULL)); | 1498 EXPECT_TRUE(GetFindBarWindowInfo(&position, NULL)); |
1497 | 1499 |
1498 ui_test_utils::NavigateToURLWithDisposition( | 1500 ui_test_utils::NavigateToURLWithDisposition( |
1499 browser(), url, NEW_FOREGROUND_TAB, | 1501 browser(), url, NEW_FOREGROUND_TAB, |
1500 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); | 1502 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
1501 chrome::CloseTab(browser()); | 1503 chrome::CloseTab(browser()); |
1502 EXPECT_TRUE(GetFindBarWindowInfo(&position2, NULL)); | 1504 EXPECT_TRUE(GetFindBarWindowInfo(&position2, NULL)); |
1503 EXPECT_EQ(position, position2); | 1505 EXPECT_EQ(position, position2); |
1504 } | 1506 } |
OLD | NEW |