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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "chrome/browser/extensions/webstore_inline_installer.h" | 7 #include "chrome/browser/extensions/webstore_inline_installer.h" |
8 #include "chrome/common/extensions/webstore_install_result.h" | 8 #include "chrome/common/extensions/webstore_install_result.h" |
9 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 9 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 void TearDown() override; | 57 void TearDown() override; |
58 | 58 |
59 bool TestSingleVerifiedSite(const std::string& requestor_url, | 59 bool TestSingleVerifiedSite(const std::string& requestor_url, |
60 const std::string& verified_site); | 60 const std::string& verified_site); |
61 | 61 |
62 bool TestMultipleVerifiedSites( | 62 bool TestMultipleVerifiedSites( |
63 const std::string& requestor_url, | 63 const std::string& requestor_url, |
64 const std::vector<std::string>& verified_sites); | 64 const std::vector<std::string>& verified_sites); |
65 | 65 |
66 protected: | 66 protected: |
67 scoped_ptr<content::WebContents> web_contents_; | 67 std::unique_ptr<content::WebContents> web_contents_; |
68 }; | 68 }; |
69 | 69 |
70 void WebstoreInlineInstallerTest::SetUp() { | 70 void WebstoreInlineInstallerTest::SetUp() { |
71 ChromeRenderViewHostTestHarness::SetUp(); | 71 ChromeRenderViewHostTestHarness::SetUp(); |
72 web_contents_.reset(CreateTestWebContents()); | 72 web_contents_.reset(CreateTestWebContents()); |
73 } | 73 } |
74 | 74 |
75 void WebstoreInlineInstallerTest::TearDown() { | 75 void WebstoreInlineInstallerTest::TearDown() { |
76 web_contents_.reset(NULL); | 76 web_contents_.reset(NULL); |
77 ChromeRenderViewHostTestHarness::TearDown(); | 77 ChromeRenderViewHostTestHarness::TearDown(); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 verified_sites)); | 219 verified_sites)); |
220 | 220 |
221 EXPECT_FALSE(TestMultipleVerifiedSites("http://baz.example.com", | 221 EXPECT_FALSE(TestMultipleVerifiedSites("http://baz.example.com", |
222 verified_sites)); | 222 verified_sites)); |
223 | 223 |
224 EXPECT_FALSE(TestMultipleVerifiedSites("http://bar.example.com:456", | 224 EXPECT_FALSE(TestMultipleVerifiedSites("http://bar.example.com:456", |
225 verified_sites)); | 225 verified_sites)); |
226 } | 226 } |
227 | 227 |
228 } // namespace extensions | 228 } // namespace extensions |
OLD | NEW |