OLD | NEW |
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 "base/path_service.h" | 5 #include "base/path_service.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "content/browser/child_process_security_policy_impl.h" | 7 #include "content/browser/child_process_security_policy_impl.h" |
8 #include "content/browser/frame_host/render_frame_host_impl.h" | 8 #include "content/browser/frame_host/render_frame_host_impl.h" |
9 #include "content/browser/renderer_host/render_message_filter.h" | 9 #include "content/browser/renderer_host/render_message_filter.h" |
10 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 10 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 return url.scheme() == url::kFileScheme; | 35 return url.scheme() == url::kFileScheme; |
36 } | 36 } |
37 | 37 |
38 private: | 38 private: |
39 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestBrowserClient); | 39 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestBrowserClient); |
40 }; | 40 }; |
41 | 41 |
42 class RenderViewHostTest : public RenderViewHostImplTestHarness { | 42 class RenderViewHostTest : public RenderViewHostImplTestHarness { |
43 public: | 43 public: |
44 RenderViewHostTest() : old_browser_client_(NULL) {} | 44 RenderViewHostTest() : old_browser_client_(NULL) {} |
45 virtual ~RenderViewHostTest() {} | 45 ~RenderViewHostTest() override {} |
46 | 46 |
47 virtual void SetUp() override { | 47 void SetUp() override { |
48 RenderViewHostImplTestHarness::SetUp(); | 48 RenderViewHostImplTestHarness::SetUp(); |
49 old_browser_client_ = SetBrowserClientForTesting(&test_browser_client_); | 49 old_browser_client_ = SetBrowserClientForTesting(&test_browser_client_); |
50 } | 50 } |
51 | 51 |
52 virtual void TearDown() override { | 52 void TearDown() override { |
53 SetBrowserClientForTesting(old_browser_client_); | 53 SetBrowserClientForTesting(old_browser_client_); |
54 RenderViewHostImplTestHarness::TearDown(); | 54 RenderViewHostImplTestHarness::TearDown(); |
55 } | 55 } |
56 | 56 |
57 private: | 57 private: |
58 RenderViewHostTestBrowserClient test_browser_client_; | 58 RenderViewHostTestBrowserClient test_browser_client_; |
59 ContentBrowserClient* old_browser_client_; | 59 ContentBrowserClient* old_browser_client_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTest); | 61 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTest); |
62 }; | 62 }; |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 const std::string data_url = "data:image/gif;base64," | 311 const std::string data_url = "data:image/gif;base64," |
312 "R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="; | 312 "R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="; |
313 | 313 |
314 tester->Reset(); | 314 tester->Reset(); |
315 tester->Test(data_url); | 315 tester->Test(data_url); |
316 EXPECT_EQ(tester->UrlString(), data_url); | 316 EXPECT_EQ(tester->UrlString(), data_url); |
317 EXPECT_TRUE(tester->IsDownloaded()); | 317 EXPECT_TRUE(tester->IsDownloaded()); |
318 } | 318 } |
319 | 319 |
320 } // namespace content | 320 } // namespace content |
OLD | NEW |