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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 } | 45 } |
46 | 46 |
47 TestWebstoreInlineInstaller::~TestWebstoreInlineInstaller() {} | 47 TestWebstoreInlineInstaller::~TestWebstoreInlineInstaller() {} |
48 | 48 |
49 // We inherit from ChromeRenderViewHostTestHarness only for | 49 // We inherit from ChromeRenderViewHostTestHarness only for |
50 // CreateTestWebContents, because we need a mock WebContents to support the | 50 // CreateTestWebContents, because we need a mock WebContents to support the |
51 // underlying WebstoreInlineInstaller in each test case. | 51 // underlying WebstoreInlineInstaller in each test case. |
52 class WebstoreInlineInstallerTest : public ChromeRenderViewHostTestHarness { | 52 class WebstoreInlineInstallerTest : public ChromeRenderViewHostTestHarness { |
53 public: | 53 public: |
54 // testing::Test | 54 // testing::Test |
55 virtual void SetUp() OVERRIDE; | 55 virtual void SetUp() override; |
56 virtual void TearDown() OVERRIDE; | 56 virtual void TearDown() override; |
57 | 57 |
58 bool TestSingleVerifiedSite(const std::string& requestor_url, | 58 bool TestSingleVerifiedSite(const std::string& requestor_url, |
59 const std::string& verified_site); | 59 const std::string& verified_site); |
60 | 60 |
61 bool TestMultipleVerifiedSites( | 61 bool TestMultipleVerifiedSites( |
62 const std::string& requestor_url, | 62 const std::string& requestor_url, |
63 const std::vector<std::string>& verified_sites); | 63 const std::vector<std::string>& verified_sites); |
64 | 64 |
65 protected: | 65 protected: |
66 scoped_ptr<content::WebContents> web_contents_; | 66 scoped_ptr<content::WebContents> web_contents_; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 verified_sites)); | 218 verified_sites)); |
219 | 219 |
220 EXPECT_FALSE(TestMultipleVerifiedSites("http://baz.example.com", | 220 EXPECT_FALSE(TestMultipleVerifiedSites("http://baz.example.com", |
221 verified_sites)); | 221 verified_sites)); |
222 | 222 |
223 EXPECT_FALSE(TestMultipleVerifiedSites("http://bar.example.com:456", | 223 EXPECT_FALSE(TestMultipleVerifiedSites("http://bar.example.com:456", |
224 verified_sites)); | 224 verified_sites)); |
225 } | 225 } |
226 | 226 |
227 } // namespace extensions | 227 } // namespace extensions |
OLD | NEW |