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

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

Issue 1554233005: Don't allow inline install if frame is deleted before user accepts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 4 years, 11 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
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/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 21 matching lines...) Expand all
32 }; 32 };
33 33
34 void TestInstallerCallback(bool success, 34 void TestInstallerCallback(bool success,
35 const std::string& error, 35 const std::string& error,
36 webstore_install::Result result) {} 36 webstore_install::Result result) {}
37 37
38 TestWebstoreInlineInstaller::TestWebstoreInlineInstaller( 38 TestWebstoreInlineInstaller::TestWebstoreInlineInstaller(
39 content::WebContents* contents, 39 content::WebContents* contents,
40 const std::string& requestor_url) 40 const std::string& requestor_url)
41 : WebstoreInlineInstaller(contents, 41 : WebstoreInlineInstaller(contents,
42 contents->GetMainFrame(),
42 "", 43 "",
43 GURL(requestor_url), 44 GURL(requestor_url),
44 base::Bind(&TestInstallerCallback)) { 45 base::Bind(&TestInstallerCallback)) {
45 } 46 }
46 47
47 TestWebstoreInlineInstaller::~TestWebstoreInlineInstaller() {} 48 TestWebstoreInlineInstaller::~TestWebstoreInlineInstaller() {}
48 49
49 // We inherit from ChromeRenderViewHostTestHarness only for 50 // We inherit from ChromeRenderViewHostTestHarness only for
50 // CreateTestWebContents, because we need a mock WebContents to support the 51 // CreateTestWebContents, because we need a mock WebContents to support the
51 // underlying WebstoreInlineInstaller in each test case. 52 // underlying WebstoreInlineInstaller in each test case.
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 verified_sites)); 219 verified_sites));
219 220
220 EXPECT_FALSE(TestMultipleVerifiedSites("http://baz.example.com", 221 EXPECT_FALSE(TestMultipleVerifiedSites("http://baz.example.com",
221 verified_sites)); 222 verified_sites));
222 223
223 EXPECT_FALSE(TestMultipleVerifiedSites("http://bar.example.com:456", 224 EXPECT_FALSE(TestMultipleVerifiedSites("http://bar.example.com:456",
224 verified_sites)); 225 verified_sites));
225 } 226 }
226 227
227 } // namespace extensions 228 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698