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

Side by Side Diff: chrome/browser/apps/ephemeral_app_launcher_browsertest.cc

Issue 384823002: Introduce a stable set of errors for inline install (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace printf with vlog(1) in unrelated code so it passes presubmit Created 6 years, 5 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 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/message_loop/message_loop_proxy.h" 5 #include "base/message_loop/message_loop_proxy.h"
6 #include "chrome/browser/apps/ephemeral_app_launcher.h" 6 #include "chrome/browser/apps/ephemeral_app_launcher.h"
7 #include "chrome/browser/extensions/extension_install_checker.h" 7 #include "chrome/browser/extensions/extension_install_checker.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_test_message_listener.h" 9 #include "chrome/browser/extensions/extension_test_message_listener.h"
10 #include "chrome/browser/extensions/install_tracker.h" 10 #include "chrome/browser/extensions/install_tracker.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 mutable bool install_initiated_; 129 mutable bool install_initiated_;
130 std::string requirements_check_error_; 130 std::string requirements_check_error_;
131 bool install_prompt_created_; 131 bool install_prompt_created_;
132 }; 132 };
133 133
134 class LaunchObserver { 134 class LaunchObserver {
135 public: 135 public:
136 LaunchObserver() 136 LaunchObserver()
137 : done_(false), 137 : done_(false),
138 waiting_(false), 138 waiting_(false),
139 result_(webstore_install::UNKNOWN_ERROR) {} 139 result_(webstore_install::OTHER_ERROR) {}
140 140
141 webstore_install::Result result() const { return result_; } 141 webstore_install::Result result() const { return result_; }
142 const std::string& error() const { return error_; } 142 const std::string& error() const { return error_; }
143 143
144 void OnLaunchCallback(webstore_install::Result result, 144 void OnLaunchCallback(webstore_install::Result result,
145 const std::string& error) { 145 const std::string& error) {
146 result_ = result; 146 result_ = result;
147 error_ = error; 147 error_ = error;
148 done_ = true; 148 done_ = true;
149 if (waiting_) { 149 if (waiting_) {
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 } 538 }
539 539
540 // Verifies that a launch will fail if a duplicate launch is in progress. 540 // Verifies that a launch will fail if a duplicate launch is in progress.
541 IN_PROC_BROWSER_TEST_F(EphemeralAppLauncherTest, DuplicateLaunchInProgress) { 541 IN_PROC_BROWSER_TEST_F(EphemeralAppLauncherTest, DuplicateLaunchInProgress) {
542 extensions::ActiveInstallData install_data(kDefaultAppId); 542 extensions::ActiveInstallData install_data(kDefaultAppId);
543 install_data.is_ephemeral = true; 543 install_data.is_ephemeral = true;
544 InstallTracker::Get(profile())->AddActiveInstall(install_data); 544 InstallTracker::Get(profile())->AddActiveInstall(install_data);
545 545
546 RunLaunchTest(kDefaultAppId, webstore_install::LAUNCH_IN_PROGRESS, false); 546 RunLaunchTest(kDefaultAppId, webstore_install::LAUNCH_IN_PROGRESS, false);
547 } 547 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698