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

Side by Side Diff: content/public/test/content_browser_test_utils.cc

Issue 176883012: Set the original url correctly if the frame is loaded via loadData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase correctly Created 6 years, 8 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
« no previous file with comments | « content/public/test/content_browser_test_utils.h ('k') | content/renderer/render_frame_impl.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 "content/public/test/content_browser_test_utils.h" 5 #include "content/public/test/content_browser_test_utils.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 25 matching lines...) Expand all
36 const GURL& url, 36 const GURL& url,
37 int number_of_navigations) { 37 int number_of_navigations) {
38 WaitForLoadStop(window->web_contents()); 38 WaitForLoadStop(window->web_contents());
39 TestNavigationObserver same_tab_observer(window->web_contents(), 39 TestNavigationObserver same_tab_observer(window->web_contents(),
40 number_of_navigations); 40 number_of_navigations);
41 41
42 window->LoadURL(url); 42 window->LoadURL(url);
43 same_tab_observer.Wait(); 43 same_tab_observer.Wait();
44 } 44 }
45 45
46 void LoadDataWithBaseURL(Shell* window, const GURL& url,
47 const std::string data, const GURL& base_url) {
48 WaitForLoadStop(window->web_contents());
49 TestNavigationObserver same_tab_observer(window->web_contents(), 1);
50
51 window->LoadDataWithBaseURL(url, data, base_url);
52 same_tab_observer.Wait();
53 }
54
46 void NavigateToURL(Shell* window, const GURL& url) { 55 void NavigateToURL(Shell* window, const GURL& url) {
47 NavigateToURLBlockUntilNavigationsComplete(window, url, 1); 56 NavigateToURLBlockUntilNavigationsComplete(window, url, 1);
48 } 57 }
49 58
50 void WaitForAppModalDialog(Shell* window) { 59 void WaitForAppModalDialog(Shell* window) {
51 ShellJavaScriptDialogManager* dialog_manager= 60 ShellJavaScriptDialogManager* dialog_manager=
52 static_cast<ShellJavaScriptDialogManager*>( 61 static_cast<ShellJavaScriptDialogManager*>(
53 window->GetJavaScriptDialogManager()); 62 window->GetJavaScriptDialogManager());
54 63
55 scoped_refptr<MessageLoopRunner> runner = new MessageLoopRunner(); 64 scoped_refptr<MessageLoopRunner> runner = new MessageLoopRunner();
(...skipping 20 matching lines...) Expand all
76 } 85 }
77 86
78 void ShellAddedObserver::ShellCreated(Shell* shell) { 87 void ShellAddedObserver::ShellCreated(Shell* shell) {
79 DCHECK(!shell_); 88 DCHECK(!shell_);
80 shell_ = shell; 89 shell_ = shell;
81 if (runner_.get()) 90 if (runner_.get())
82 runner_->QuitClosure().Run(); 91 runner_->QuitClosure().Run();
83 } 92 }
84 93
85 } // namespace content 94 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/content_browser_test_utils.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698