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

Side by Side Diff: chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc

Issue 634313004: Display dialog when app install succeeds / fails on Athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "chrome/browser/chrome_notification_types.h" 11 #include "chrome/browser/chrome_notification_types.h"
12 #include "chrome/browser/extensions/api/management/management_api.h" 12 #include "chrome/browser/extensions/api/management/management_api.h"
13 #include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h" 13 #include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h"
14 #include "chrome/browser/extensions/extension_apitest.h" 14 #include "chrome/browser/extensions/extension_apitest.h"
15 #include "chrome/browser/extensions/extension_function_test_utils.h" 15 #include "chrome/browser/extensions/extension_function_test_utils.h"
16 #include "chrome/browser/extensions/extension_install_prompt.h" 16 #include "chrome/browser/extensions/extension_install_prompt.h"
17 #include "chrome/browser/extensions/extension_install_ui.h"
18 #include "chrome/browser/extensions/extension_service.h" 17 #include "chrome/browser/extensions/extension_service.h"
19 #include "chrome/browser/extensions/webstore_installer.h" 18 #include "chrome/browser/extensions/webstore_installer.h"
20 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
21 #include "chrome/browser/ui/browser.h" 20 #include "chrome/browser/ui/browser.h"
22 #include "chrome/browser/ui/tabs/tab_strip_model.h" 21 #include "chrome/browser/ui/tabs/tab_strip_model.h"
23 #include "chrome/common/chrome_switches.h" 22 #include "chrome/common/chrome_switches.h"
24 #include "chrome/test/base/ui_test_utils.h" 23 #include "chrome/test/base/ui_test_utils.h"
25 #include "content/public/browser/gpu_data_manager.h" 24 #include "content/public/browser/gpu_data_manager.h"
26 #include "content/public/browser/notification_observer.h" 25 #include "content/public/browser/notification_observer.h"
27 #include "content/public/browser/notification_registrar.h" 26 #include "content/public/browser/notification_registrar.h"
28 #include "content/public/test/browser_test_utils.h" 27 #include "content/public/test/browser_test_utils.h"
29 #include "extensions/browser/extension_system.h" 28 #include "extensions/browser/extension_system.h"
29 #include "extensions/browser/install/extension_install_ui.h"
30 #include "gpu/config/gpu_feature_type.h" 30 #include "gpu/config/gpu_feature_type.h"
31 #include "gpu/config/gpu_info.h" 31 #include "gpu/config/gpu_info.h"
32 #include "net/dns/mock_host_resolver.h" 32 #include "net/dns/mock_host_resolver.h"
33 #include "ui/gl/gl_switches.h" 33 #include "ui/gl/gl_switches.h"
34 34
35 using gpu::GpuFeatureType; 35 using gpu::GpuFeatureType;
36 36
37 namespace utils = extension_function_test_utils; 37 namespace utils = extension_function_test_utils;
38 38
39 namespace extensions { 39 namespace extensions {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 "http://www.example.com/files/extensions/api_test"); 102 "http://www.example.com/files/extensions/api_test");
103 } 103 }
104 104
105 virtual void SetUpInProcessBrowserTestFixture() override { 105 virtual void SetUpInProcessBrowserTestFixture() override {
106 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); 106 ExtensionApiTest::SetUpInProcessBrowserTestFixture();
107 107
108 // Start up the test server and get us ready for calling the install 108 // Start up the test server and get us ready for calling the install
109 // API functions. 109 // API functions.
110 host_resolver()->AddRule("www.example.com", "127.0.0.1"); 110 host_resolver()->AddRule("www.example.com", "127.0.0.1");
111 ASSERT_TRUE(StartSpawnedTestServer()); 111 ASSERT_TRUE(StartSpawnedTestServer());
112 ExtensionInstallUI::set_disable_failure_ui_for_tests(); 112 extensions::ExtensionInstallUI::set_disable_failure_ui_for_tests();
113 } 113 }
114 114
115 virtual void SetUpOnMainThread() override { 115 virtual void SetUpOnMainThread() override {
116 ExtensionApiTest::SetUpOnMainThread(); 116 ExtensionApiTest::SetUpOnMainThread();
117 117
118 ExtensionInstallPrompt::g_auto_confirm_for_tests = 118 ExtensionInstallPrompt::g_auto_confirm_for_tests =
119 ExtensionInstallPrompt::ACCEPT; 119 ExtensionInstallPrompt::ACCEPT;
120 120
121 ASSERT_TRUE(webstore_install_dir_.CreateUniqueTempDir()); 121 ASSERT_TRUE(webstore_install_dir_.CreateUniqueTempDir());
122 webstore_install_dir_copy_ = webstore_install_dir_.path(); 122 webstore_install_dir_copy_ = webstore_install_dir_.path();
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 } 424 }
425 425
426 // Run tests when the --enable-ephemeral-apps switch is enabled. 426 // Run tests when the --enable-ephemeral-apps switch is enabled.
427 IN_PROC_BROWSER_TEST_F(EphemeralAppWebstorePrivateApiTest, LaunchEphemeralApp) { 427 IN_PROC_BROWSER_TEST_F(EphemeralAppWebstorePrivateApiTest, LaunchEphemeralApp) {
428 CommandLine::ForCurrentProcess()->AppendSwitch( 428 CommandLine::ForCurrentProcess()->AppendSwitch(
429 switches::kEnableEphemeralApps); 429 switches::kEnableEphemeralApps);
430 ASSERT_TRUE(RunInstallTest("webstore_launch_app.html", "app.crx")); 430 ASSERT_TRUE(RunInstallTest("webstore_launch_app.html", "app.crx"));
431 } 431 }
432 432
433 } // namespace extensions 433 } // namespace extensions
OLDNEW
« no previous file with comments | « athena/extensions/test/test_extensions_delegate.cc ('k') | chrome/browser/extensions/crx_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698