summaryrefslogtreecommitdiffstats
path: root/ui/message_center/test/run_all_unittests.cc
blob: 0c2e56a39a0d49f7fa40ad4048569b7543963c20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright 2013 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 "base/basictypes.h"
#include "base/compiler_specific.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/compositor/compositor_setup.h"
#include "ui/compositor/test/compositor_test_support.h"
#include "ui/test/test_suite.h"
#include "ui/views/view.h"

class MessageCenterTestSuite : public ui::test::UITestSuite {
 public:
  MessageCenterTestSuite(int argc, char** argv)
      : ui::test::UITestSuite(argc, argv) {
  }

 protected:
  virtual void Initialize() OVERRIDE;
  virtual void Shutdown() OVERRIDE;

 private:
  DISALLOW_COPY_AND_ASSIGN(MessageCenterTestSuite);
};

void MessageCenterTestSuite::Initialize() {
  ui::test::UITestSuite::Initialize();

#if !defined(OS_MACOSX)
  ui::CompositorTestSupport::Initialize();
  ui::SetupTestCompositor();
#endif
}

void MessageCenterTestSuite::Shutdown() {
  ui::test::UITestSuite::Shutdown();

#if !defined(OS_MACOSX)
  ui::CompositorTestSupport::Terminate();
#endif
}

int main(int argc, char** argv) {
  return MessageCenterTestSuite(argc, argv).Run();
}