[Android] Implement 3-way sensor fallback for Device Orientation.
[chromium-blink-merge.git] / content / public / test / unittest_test_suite.h
blobb59cdd09124d93af8829dab5abf94956ec2629ee
1 // Copyright (c) 2012 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 #ifndef CONTENT_PUBLIC_TEST_UNITTEST_TEST_SUITE_H_
6 #define CONTENT_PUBLIC_TEST_UNITTEST_TEST_SUITE_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
11 namespace base {
12 class TestSuite;
15 namespace content {
16 class TestBlinkWebUnitTestSupport;
18 // A special test suite that also initializes WebKit once for all unittests.
19 // This is useful for two reasons:
20 // 1. It allows the use of some primitive WebKit data types like WebString.
21 // 2. Individual unittests should not be initting WebKit on their own, initting
22 // it here ensures attempts to do so within an individual test will fail.
23 class UnitTestTestSuite {
24 public:
25 // Takes ownership of |test_suite|.
26 explicit UnitTestTestSuite(base::TestSuite* test_suite);
27 ~UnitTestTestSuite();
29 int Run();
31 private:
32 scoped_ptr<base::TestSuite> test_suite_;
34 #if !defined(OS_IOS)
35 scoped_ptr<TestBlinkWebUnitTestSupport> blink_test_support_;
36 #endif
38 DISALLOW_COPY_AND_ASSIGN(UnitTestTestSuite);
41 } // namespace content
43 #endif // CONTENT_PUBLIC_TEST_UNITTEST_TEST_SUITE_H_