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

Side by Side Diff: chrome/browser/history/history_browsertest.cc

Issue 10823392: Let ui_test_utils::FindInPage optionally return the selection rect. This will be used in a future c… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_focus_uitest.cc ('k') | chrome/browser/tab_restore_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // If this test flakes, use bug 22111. 302 // If this test flakes, use bug 22111.
303 IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, HistorySearchXSS) { 303 IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, HistorySearchXSS) {
304 GURL url(std::string(chrome::kChromeUIHistoryURL) + 304 GURL url(std::string(chrome::kChromeUIHistoryURL) +
305 "#q=%3Cimg%20src%3Dx%3Ax%20onerror%3D%22document.title%3D'XSS'%22%3E"); 305 "#q=%3Cimg%20src%3Dx%3Ax%20onerror%3D%22document.title%3D'XSS'%22%3E");
306 ui_test_utils::NavigateToURL(browser(), url); 306 ui_test_utils::NavigateToURL(browser(), url);
307 // Mainly, this is to ensure we send a synchronous message to the renderer 307 // Mainly, this is to ensure we send a synchronous message to the renderer
308 // so that we're not susceptible (less susceptible?) to a race condition. 308 // so that we're not susceptible (less susceptible?) to a race condition.
309 // Should a race condition ever trigger, it won't result in flakiness. 309 // Should a race condition ever trigger, it won't result in flakiness.
310 int num = ui_test_utils::FindInPage( 310 int num = ui_test_utils::FindInPage(
311 chrome::GetActiveTabContents(browser()), ASCIIToUTF16("<img"), true, 311 chrome::GetActiveTabContents(browser()), ASCIIToUTF16("<img"), true,
312 true, NULL); 312 true, NULL, NULL);
313 EXPECT_GT(num, 0); 313 EXPECT_GT(num, 0);
314 EXPECT_EQ(ASCIIToUTF16("History"), 314 EXPECT_EQ(ASCIIToUTF16("History"),
315 chrome::GetActiveWebContents(browser())->GetTitle()); 315 chrome::GetActiveWebContents(browser())->GetTitle());
316 } 316 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_focus_uitest.cc ('k') | chrome/browser/tab_restore_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698