Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: chrome/browser/ui/find_bar/find_bar_host_browsertest.cc

Issue 2436253002: PlzNavigate: Fix the FindInPageControllerTest.SearchWithinSpecialURL browser test. (Closed)
Patch Set: Use FilterURL to validate access from the renderer for a URL being redirected. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_WIN) || defined(OS_MACOSX) 304 #if defined(OS_MACOSX)
305 // Disabled due to crbug.com/175711 and http://crbug.com/419987 305 // Disabled due to http://crbug.com/419987
306 #define MAYBE_SearchWithinSpecialURL \ 306 #define MAYBE_SearchWithinSpecialURL \
307 DISABLED_SearchWithinSpecialURL 307 DISABLED_SearchWithinSpecialURL
308 #else 308 #else
309 #define MAYBE_SearchWithinSpecialURL \ 309 #define MAYBE_SearchWithinSpecialURL \
310 SearchWithinSpecialURL 310 SearchWithinSpecialURL
311 #endif 311 #endif
312 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_SearchWithinSpecialURL) { 312 IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_SearchWithinSpecialURL) {
313 // TODO(tsergeant): Get this test working on MD History, which loads very 313 // TODO(tsergeant): Get this test working on MD History, which loads very
314 // asynchronously and causes this test to fail. 314 // asynchronously and causes this test to fail.
315 MdHistoryUI::SetEnabledForTesting(false); 315 MdHistoryUI::SetEnabledForTesting(false);
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 1553
1554 EXPECT_TRUE(chrome::ExecuteCommand(browser_incognito, IDC_FIND_NEXT)); 1554 EXPECT_TRUE(chrome::ExecuteCommand(browser_incognito, IDC_FIND_NEXT));
1555 WebContents* web_contents_incognito = 1555 WebContents* web_contents_incognito =
1556 browser_incognito->tab_strip_model()->GetActiveWebContents(); 1556 browser_incognito->tab_strip_model()->GetActiveWebContents();
1557 ui_test_utils::FindInPageNotificationObserver observer( 1557 ui_test_utils::FindInPageNotificationObserver observer(
1558 web_contents_incognito); 1558 web_contents_incognito);
1559 observer.Wait(); 1559 observer.Wait();
1560 EXPECT_EQ(ASCIIToUTF16("bar"), 1560 EXPECT_EQ(ASCIIToUTF16("bar"),
1561 GetFindBarTextForBrowser(browser_incognito)); 1561 GetFindBarTextForBrowser(browser_incognito));
1562 } 1562 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_request.cc » ('j') | content/browser/frame_host/navigation_request.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698