OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "chrome/browser/extensions/extension_install_prompt.h" | 8 #include "chrome/browser/extensions/extension_install_prompt.h" |
9 #include "content/public/test/test_browser_thread_bundle.h" | 9 #include "content/public/test/test_browser_thread_bundle.h" |
10 #include "extensions/common/extension.h" | 10 #include "extensions/common/extension.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 ExtensionBuilder().SetManifest( | 42 ExtensionBuilder().SetManifest( |
43 DictionaryBuilder().Set("name", "foo") | 43 DictionaryBuilder().Set("name", "foo") |
44 .Set("version", "1.0") | 44 .Set("version", "1.0") |
45 .Set("manifest_version", 2) | 45 .Set("manifest_version", 2) |
46 .Set("description", "Random Ext")).Build(); | 46 .Set("description", "Random Ext")).Build(); |
47 ExtensionInstallPrompt prompt(NULL /* no web contents in this test */); | 47 ExtensionInstallPrompt prompt(NULL /* no web contents in this test */); |
48 base::RunLoop run_loop; | 48 base::RunLoop run_loop; |
49 prompt.set_callback_for_test(base::Bind(&VerifyPromptPermissionsCallback, | 49 prompt.set_callback_for_test(base::Bind(&VerifyPromptPermissionsCallback, |
50 run_loop.QuitClosure())); | 50 run_loop.QuitClosure())); |
51 prompt.ConfirmPermissions(NULL, // no delegate | 51 prompt.ConfirmPermissions(NULL, // no delegate |
52 extension, | 52 extension.get(), |
53 permission_set); | 53 permission_set.get()); |
54 run_loop.Run(); | 54 run_loop.Run(); |
55 } | 55 } |
56 | 56 |
57 } // namespace extensions | 57 } // namespace extensions |
OLD | NEW |