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

Side by Side Diff: content/browser/find_request_manager_browsertest.cc

Issue 2481923002: [WIP] make GURL::path() return a StringPiece (Closed)
Patch Set: thanks asan 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "content/browser/web_contents/web_contents_impl.h" 7 #include "content/browser/web_contents/web_contents_impl.h"
8 #include "content/public/browser/notification_types.h" 8 #include "content/public/browser/notification_types.h"
9 #include "content/public/common/content_switches.h" 9 #include "content/public/common/content_switches.h"
10 #include "content/public/test/browser_test_utils.h" 10 #include "content/public/test/browser_test_utils.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 LoadAndWait("/find_in_page_multi_frame.html"); 274 LoadAndWait("/find_in_page_multi_frame.html");
275 FrameTreeNode* root = contents()->GetFrameTree()->root(); 275 FrameTreeNode* root = contents()->GetFrameTree()->root();
276 LoadMultiFramePageChildFrames(height, cross_process, root); 276 LoadMultiFramePageChildFrames(height, cross_process, root);
277 } 277 }
278 278
279 // Reloads the child frame cross-process. 279 // Reloads the child frame cross-process.
280 void MakeChildFrameCrossProcess() { 280 void MakeChildFrameCrossProcess() {
281 FrameTreeNode* root = contents()->GetFrameTree()->root(); 281 FrameTreeNode* root = contents()->GetFrameTree()->root();
282 FrameTreeNode* child = root->child_at(0); 282 FrameTreeNode* child = root->child_at(0);
283 GURL url(embedded_test_server()->GetURL( 283 GURL url(embedded_test_server()->GetURL(
284 "b.com", child->current_url().path())); 284 "b.com", child->current_url().path().as_string()));
285 285
286 TestNavigationObserver observer(shell()->web_contents()); 286 TestNavigationObserver observer(shell()->web_contents());
287 NavigateFrameToURL(child, url); 287 NavigateFrameToURL(child, url);
288 EXPECT_EQ(url, observer.last_navigation_url()); 288 EXPECT_EQ(url, observer.last_navigation_url());
289 EXPECT_TRUE(observer.last_navigation_succeeded()); 289 EXPECT_TRUE(observer.last_navigation_succeeded());
290 } 290 }
291 291
292 void Find(const std::string& search_text, 292 void Find(const std::string& search_text,
293 const blink::WebFindOptions& options) { 293 const blink::WebFindOptions& options) {
294 delegate()->UpdateLastRequest(++last_request_id_); 294 delegate()->UpdateLastRequest(++last_request_id_);
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 delegate()->MarkNextReply(); 803 delegate()->MarkNextReply();
804 contents()->ActivateNearestFindResult( 804 contents()->ActivateNearestFindResult(
805 rects[order[i]].CenterPoint().x(), rects[order[i]].CenterPoint().y()); 805 rects[order[i]].CenterPoint().x(), rects[order[i]].CenterPoint().y());
806 delegate()->WaitForNextReply(); 806 delegate()->WaitForNextReply();
807 EXPECT_EQ(order[i] + 1, delegate()->GetFindResults().active_match_ordinal); 807 EXPECT_EQ(order[i] + 1, delegate()->GetFindResults().active_match_ordinal);
808 } 808 }
809 } 809 }
810 #endif // defined(OS_ANDROID) 810 #endif // defined(OS_ANDROID)
811 811
812 } // namespace content 812 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698