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

Side by Side Diff: chrome/browser/extensions/webstore_inline_installer_unittest.cc

Issue 14197014: Add TestBrowserThreadBundle into RenderViewHostTestHarness. Kill some unnecessary real threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged ToT Created 7 years, 6 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 #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/test/base/chrome_render_view_host_test_harness.h" 8 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 virtual void TearDown() OVERRIDE; 55 virtual void TearDown() OVERRIDE;
56 56
57 bool TestSingleVerifiedSite(const std::string& requestor_url, 57 bool TestSingleVerifiedSite(const std::string& requestor_url,
58 const std::string& verified_site); 58 const std::string& verified_site);
59 59
60 bool TestMultipleVerifiedSites( 60 bool TestMultipleVerifiedSites(
61 const std::string& requestor_url, 61 const std::string& requestor_url,
62 const std::vector<std::string>& verified_sites); 62 const std::vector<std::string>& verified_sites);
63 63
64 protected: 64 protected:
65 WebstoreInlineInstallerTest()
66 : thread_(content::BrowserThread::UI, &message_loop_) {}
67
68 content::TestBrowserThread thread_;
69 scoped_ptr<content::WebContents> web_contents_; 65 scoped_ptr<content::WebContents> web_contents_;
70 }; 66 };
71 67
72 void WebstoreInlineInstallerTest::SetUp() { 68 void WebstoreInlineInstallerTest::SetUp() {
73 ChromeRenderViewHostTestHarness::SetUp(); 69 ChromeRenderViewHostTestHarness::SetUp();
74 web_contents_.reset(CreateTestWebContents()); 70 web_contents_.reset(CreateTestWebContents());
75 } 71 }
76 72
77 void WebstoreInlineInstallerTest::TearDown() { 73 void WebstoreInlineInstallerTest::TearDown() {
78 web_contents_.reset(NULL); 74 web_contents_.reset(NULL);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 verified_sites)); 217 verified_sites));
222 218
223 EXPECT_FALSE(TestMultipleVerifiedSites("http://baz.example.com", 219 EXPECT_FALSE(TestMultipleVerifiedSites("http://baz.example.com",
224 verified_sites)); 220 verified_sites));
225 221
226 EXPECT_FALSE(TestMultipleVerifiedSites("http://bar.example.com:456", 222 EXPECT_FALSE(TestMultipleVerifiedSites("http://bar.example.com:456",
227 verified_sites)); 223 verified_sites));
228 } 224 }
229 225
230 } // namespace extensions 226 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698