BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / task_management / task_management_browsertest_util.cc
bloba644a5774f60aee889e3988e8e588e724123f774
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/task_management/task_management_browsertest_util.h"
7 #include "base/stl_util.h"
9 namespace task_management {
11 MockWebContentsTaskManager::MockWebContentsTaskManager()
12 : tasks_(),
13 provider_() {
16 MockWebContentsTaskManager::~MockWebContentsTaskManager() {
19 void MockWebContentsTaskManager::TaskAdded(Task* task) {
20 DCHECK(task);
21 DCHECK(!ContainsValue(tasks_, task));
22 tasks_.push_back(task);
25 void MockWebContentsTaskManager::TaskRemoved(Task* task) {
26 DCHECK(task);
27 DCHECK(ContainsValue(tasks_, task));
28 tasks_.erase(std::find(tasks_.begin(), tasks_.end(), task));
31 void MockWebContentsTaskManager::StartObserving() {
32 provider_.SetObserver(this);
35 void MockWebContentsTaskManager::StopObserving() {
36 provider_.ClearObserver();
39 } // namespace task_management