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

Side by Side Diff: content/browser/web_contents/test_web_contents.h

Issue 10836164: Change policy to not trigger dangerous download UI for web intents dispatched files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move to WebContentsTester Created 8 years, 3 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
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 #ifndef CONTENT_BROWSER_WEB_CONTENTS_TEST_WEB_CONTENTS_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_TEST_WEB_CONTENTS_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_TEST_WEB_CONTENTS_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_TEST_WEB_CONTENTS_H_
7 7
8 #include "content/browser/web_contents/web_contents_impl.h" 8 #include "content/browser/web_contents/web_contents_impl.h"
9 #include "content/public/common/page_transition_types.h" 9 #include "content/public/common/page_transition_types.h"
10 #include "content/public/test/web_contents_tester.h" 10 #include "content/public/test/web_contents_tester.h"
11 #include "webkit/glue/webpreferences.h" 11 #include "webkit/glue/webpreferences.h"
12 12
13 class SiteInstanceImpl; 13 class SiteInstanceImpl;
14 14
15 namespace content { 15 namespace content {
16 16
17 class RenderViewHost; 17 class RenderViewHost;
18 class TestRenderViewHost; 18 class TestRenderViewHost;
19 class WebContentsTester; 19 class WebContentsTester;
20 20
21 // Subclass WebContentsImpl to ensure it creates TestRenderViewHosts 21 // Subclass WebContentsImpl to ensure it creates TestRenderViewHosts
22 // and does not do anything involving views. 22 // and does not do anything involving views.
23 class TestWebContents : public WebContentsImpl, public WebContentsTester { 23 class TestWebContents : public WebContentsImpl, public WebContentsTester {
24 public: 24 public:
25 virtual ~TestWebContents(); 25 virtual ~TestWebContents();
26 26
27 static TestWebContents* Create(BrowserContext* browser_context, 27 static TestWebContents* Create(BrowserContext* browser_context,
28 SiteInstance* instance); 28 SiteInstance* instance);
29 static TestWebContents* CreateWithoutInit(BrowserContext* browser_context);
29 30
30 // WebContentsTester implementation. 31 // WebContentsTester implementation.
31 virtual void CommitPendingNavigation() OVERRIDE; 32 virtual void CommitPendingNavigation() OVERRIDE;
32 virtual int GetNumberOfFocusCalls() OVERRIDE; 33 virtual int GetNumberOfFocusCalls() OVERRIDE;
33 virtual RenderViewHost* GetPendingRenderViewHost() const OVERRIDE; 34 virtual RenderViewHost* GetPendingRenderViewHost() const OVERRIDE;
34 virtual void NavigateAndCommit(const GURL& url) OVERRIDE; 35 virtual void NavigateAndCommit(const GURL& url) OVERRIDE;
35 virtual void TestSetIsLoading(bool value) OVERRIDE; 36 virtual void TestSetIsLoading(bool value) OVERRIDE;
36 virtual void ProceedWithCrossSiteNavigation() OVERRIDE; 37 virtual void ProceedWithCrossSiteNavigation() OVERRIDE;
37 virtual void TestDidNavigate(RenderViewHost* render_view_host, 38 virtual void TestDidNavigate(RenderViewHost* render_view_host,
38 int page_id, 39 int page_id,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 bool expect_set_history_length_and_prune_; 119 bool expect_set_history_length_and_prune_;
119 scoped_refptr<const SiteInstanceImpl> 120 scoped_refptr<const SiteInstanceImpl>
120 expect_set_history_length_and_prune_site_instance_; 121 expect_set_history_length_and_prune_site_instance_;
121 int expect_set_history_length_and_prune_history_length_; 122 int expect_set_history_length_and_prune_history_length_;
122 int32 expect_set_history_length_and_prune_min_page_id_; 123 int32 expect_set_history_length_and_prune_min_page_id_;
123 }; 124 };
124 125
125 } // namespace content 126 } // namespace content
126 127
127 #endif // CONTENT_BROWSER_WEB_CONTENTS_TEST_WEB_CONTENTS_H_ 128 #endif // CONTENT_BROWSER_WEB_CONTENTS_TEST_WEB_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698