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/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 ui_test_utils::NavigateToURL(browser(), urls[i]); | 283 ui_test_utils::NavigateToURL(browser(), urls[i]); |
284 EXPECT_EQ(1, FindInPageWchar(web_contents, L"cat", | 284 EXPECT_EQ(1, FindInPageWchar(web_contents, L"cat", |
285 kFwd, kIgnoreCase, NULL)); | 285 kFwd, kIgnoreCase, NULL)); |
286 EXPECT_EQ(0, FindInPageWchar(web_contents, L"bat", | 286 EXPECT_EQ(0, FindInPageWchar(web_contents, L"bat", |
287 kFwd, kIgnoreCase, NULL)); | 287 kFwd, kIgnoreCase, NULL)); |
288 } | 288 } |
289 } | 289 } |
290 | 290 |
291 // Verify search for text within special URLs such as chrome:history, | 291 // Verify search for text within special URLs such as chrome:history, |
292 // chrome://downloads, data directory | 292 // chrome://downloads, data directory |
293 #if defined(OS_WIN) || defined(OS_MACOSX) | 293 #if defined(OS_WIN) |
294 // Disabled due to crbug.com/175711 (win) and crbug.com/396752 (mac). | 294 // Disabled due to crbug.com/175711 |
295 #define MAYBE_SearchWithinSpecialURL \ | 295 #define MAYBE_SearchWithinSpecialURL \ |
296 DISABLED_SearchWithinSpecialURL | 296 DISABLED_SearchWithinSpecialURL |
297 #else | 297 #else |
298 #define MAYBE_SearchWithinSpecialURL \ | 298 #define MAYBE_SearchWithinSpecialURL \ |
299 SearchWithinSpecialURL | 299 SearchWithinSpecialURL |
300 #endif | 300 #endif |
301 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_SearchWithinSpecialURL) { | 301 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_SearchWithinSpecialURL) { |
302 WebContents* web_contents = | 302 WebContents* web_contents = |
303 browser()->tab_strip_model()->GetActiveWebContents(); | 303 browser()->tab_strip_model()->GetActiveWebContents(); |
304 | 304 |
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1615 ASSERT_EQ(result, SIMPLEREGION); | 1615 ASSERT_EQ(result, SIMPLEREGION); |
1616 bool rects_equal = | 1616 bool rects_equal = |
1617 region_before.left == region_after.left && | 1617 region_before.left == region_after.left && |
1618 region_before.top == region_after.top && | 1618 region_before.top == region_after.top && |
1619 region_before.right == region_after.right && | 1619 region_before.right == region_after.right && |
1620 region_before.bottom == region_after.bottom; | 1620 region_before.bottom == region_after.bottom; |
1621 ASSERT_FALSE(rects_equal); | 1621 ASSERT_FALSE(rects_equal); |
1622 } | 1622 } |
1623 | 1623 |
1624 #endif | 1624 #endif |
OLD | NEW |