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

Side by Side Diff: chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc

Issue 2154773002: Implement Just-In-Time Flash updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git pull && gclient sync Created 4 years, 4 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 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() override { 129 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() override {
130 return task_runner_; 130 return task_runner_;
131 } 131 }
132 132
133 bool GetComponentDetails(const std::string& component_id, 133 bool GetComponentDetails(const std::string& component_id,
134 CrxUpdateItem* item) const override { 134 CrxUpdateItem* item) const override {
135 ADD_FAILURE(); 135 ADD_FAILURE();
136 return false; 136 return false;
137 } 137 }
138 138
139 std::unique_ptr<ComponentInfo> GetComponentForMimeType(
140 const std::string& mime_type) const override {
141 return nullptr;
142 }
143
139 // OnDemandUpdater implementation: 144 // OnDemandUpdater implementation:
140 bool OnDemandUpdate(const std::string& crx_id) override { 145 bool OnDemandUpdate(const std::string& crx_id) override {
141 on_demand_update_called_ = true; 146 on_demand_update_called_ = true;
142 147
143 if (!component_) { 148 if (!component_) {
144 ADD_FAILURE() << "Trying to update unregistered component " << crx_id; 149 ADD_FAILURE() << "Trying to update unregistered component " << crx_id;
145 return false; 150 return false;
146 } 151 }
147 152
148 EXPECT_EQ(GetCrxComponentID(*component_), crx_id); 153 EXPECT_EQ(GetCrxComponentID(*component_), crx_id);
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 // but it exercises a different code path. 423 // but it exercises a different code path.
419 profile_attributes_storage()->RemoveProfile(GetProfilePath(kOtherClientId)); 424 profile_attributes_storage()->RemoveProfile(GetProfilePath(kOtherClientId));
420 run_loop.RunUntilIdle(); 425 run_loop.RunUntilIdle();
421 } 426 }
422 EXPECT_FALSE(component_update_service_.registered_component()); 427 EXPECT_FALSE(component_update_service_.registered_component());
423 EXPECT_FALSE(base::DirectoryExists(whitelist_directory_)); 428 EXPECT_FALSE(base::DirectoryExists(whitelist_directory_));
424 EXPECT_FALSE(base::PathExists(whitelist_path_)); 429 EXPECT_FALSE(base::PathExists(whitelist_path_));
425 } 430 }
426 431
427 } // namespace component_updater 432 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698