| Index: ui/aura/test/aura_test_base.h
|
| diff --git a/ui/aura/test/aura_test_base.h b/ui/aura/test/aura_test_base.h
|
| index 84e72893beca95c876292e57c8cbd5a5ef392450..a76aa170ad55e28da77c0f53610d7652ad72309c 100644
|
| --- a/ui/aura/test/aura_test_base.h
|
| +++ b/ui/aura/test/aura_test_base.h
|
| @@ -27,6 +27,8 @@ class WindowTreeClientDelegate;
|
|
|
| namespace test {
|
|
|
| +enum class BackendType { CLASSIC, MUS };
|
| +
|
| // A base class for aura unit tests.
|
| // TODO(beng): Instances of this test will create and own a RootWindow.
|
| class AuraTestBase : public testing::Test,
|
| @@ -58,6 +60,10 @@ class AuraTestBase : public testing::Test,
|
| // Turns on mus. Must be called before SetUp().
|
| void EnableMus();
|
|
|
| + // Used to configure the backend. This is exposed to make parameterized tests
|
| + // easy to write. This *must* be called from SetUp().
|
| + void ConfigureBackend(BackendType type);
|
| +
|
| void RunAllPendingInMessageLoop();
|
|
|
| void ParentWindow(Window* window);
|
| @@ -128,6 +134,22 @@ class AuraTestBase : public testing::Test,
|
| DISALLOW_COPY_AND_ASSIGN(AuraTestBase);
|
| };
|
|
|
| +// Use as a base class for tests that want to target both backends.
|
| +class AuraTestBaseWithType : public AuraTestBase,
|
| + public ::testing::WithParamInterface<BackendType> {
|
| + public:
|
| + AuraTestBaseWithType();
|
| + ~AuraTestBaseWithType() override;
|
| +
|
| + // AuraTestBase:
|
| + void SetUp() override;
|
| +
|
| + private:
|
| + bool setup_called_ = false;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(AuraTestBaseWithType);
|
| +};
|
| +
|
| } // namespace test
|
| } // namespace aura
|
|
|
|
|