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

Side by Side Diff: chrome/browser/password_manager/password_manager_test_base.h

Issue 1212163007: Kill renderers for bad password forms in --site-per-process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_TEST_BASE_H_ 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_TEST_BASE_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_TEST_BASE_H_ 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_TEST_BASE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 12 matching lines...) Expand all
23 23
24 // Normally Wait() will not return until a main frame navigation occurs. 24 // Normally Wait() will not return until a main frame navigation occurs.
25 // If quit_on_entry_committed is true Wait() will return on EntryCommited. 25 // If quit_on_entry_committed is true Wait() will return on EntryCommited.
26 void set_quit_on_entry_committed(bool quit_on_entry_committed) { 26 void set_quit_on_entry_committed(bool quit_on_entry_committed) {
27 quit_on_entry_committed_ = quit_on_entry_committed; 27 quit_on_entry_committed_ = quit_on_entry_committed;
28 } 28 }
29 29
30 // Wait for navigation to succeed. 30 // Wait for navigation to succeed.
31 void Wait(); 31 void Wait();
32 32
33 // Returns the RenderFrameHost that navigated.
34 content::RenderFrameHost* render_frame_host() { return render_frame_host_; }
35
33 // content::WebContentsObserver: 36 // content::WebContentsObserver:
34 void DidFinishLoad(content::RenderFrameHost* render_frame_host, 37 void DidFinishLoad(content::RenderFrameHost* render_frame_host,
35 const GURL& validated_url) override; 38 const GURL& validated_url) override;
36 void NavigationEntryCommitted( 39 void NavigationEntryCommitted(
37 const content::LoadCommittedDetails& load_details) override; 40 const content::LoadCommittedDetails& load_details) override;
38 41
39 private: 42 private:
40 std::string wait_for_path_; 43 std::string wait_for_path_;
44 content::RenderFrameHost* render_frame_host_;
41 bool quit_on_entry_committed_; 45 bool quit_on_entry_committed_;
42 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; 46 scoped_refptr<content::MessageLoopRunner> message_loop_runner_;
43 47
44 DISALLOW_COPY_AND_ASSIGN(NavigationObserver); 48 DISALLOW_COPY_AND_ASSIGN(NavigationObserver);
45 }; 49 };
46 50
47 // Observes the save password prompt (bubble or infobar) for a specified 51 // Observes the save password prompt (bubble or infobar) for a specified
48 // WebContents, keeps track of whether or not it is currently shown, and allows 52 // WebContents, keeps track of whether or not it is currently shown, and allows
49 // accepting saving passwords through it. 53 // accepting saving passwords through it.
50 class PromptObserver { 54 class PromptObserver {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 117
114 // Accessors 118 // Accessors
115 content::WebContents* WebContents(); 119 content::WebContents* WebContents();
116 content::RenderViewHost* RenderViewHost(); 120 content::RenderViewHost* RenderViewHost();
117 121
118 private: 122 private:
119 DISALLOW_COPY_AND_ASSIGN(PasswordManagerBrowserTestBase); 123 DISALLOW_COPY_AND_ASSIGN(PasswordManagerBrowserTestBase);
120 }; 124 };
121 125
122 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_TEST_BASE_H_ 126 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698