summaryrefslogtreecommitdiffstats
path: root/media/base/mock_task.cc
blob: f9f8823dcc4a6c887699d627972bc8b88d36c6f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "media/base/mock_task.h"

namespace media {

TaskMocker::TaskMocker()
    : outstanding_tasks_(0) {
}

TaskMocker::~TaskMocker() {
  CHECK(outstanding_tasks_ == 0)
      << "If outstanding_tasks_ is not zero, tasks have been leaked.";
}

Task* TaskMocker::CreateTask() {
  return new CountingTask(this);
}

}  // namespace media