diff options
author | sammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-26 19:48:04 +0000 |
---|---|---|
committer | sammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-26 19:48:04 +0000 |
commit | f80685c31c04410dc90bc45f492f4adc73ace117 (patch) | |
tree | 10bc5ea060c8538b846ff79a44beb0ab18947904 /extensions/renderer/api_test_base_unittest.cc | |
parent | 5f2d097e8e839a4ab180cc8f63a5ddec4378e408 (diff) | |
download | chromium_src-f80685c31c04410dc90bc45f492f4adc73ace117.zip chromium_src-f80685c31c04410dc90bc45f492f4adc73ace117.tar.gz chromium_src-f80685c31c04410dc90bc45f492f4adc73ace117.tar.bz2 |
Add support for writing unit tests for Mojo-backed apps/extensions APIs.
This change adds the infrastructure for unit testing the JS parts of
apps and extensions APIs implemented on top of Mojo services. The test
environment provides a partial implementation of the JS test API
provided to browser tests. A TestServiceProvider implementation is
used to provide test implementations of the appropriate Mojo services to
the JS code.
BUG=389016
Review URL: https://codereview.chromium.org/399363002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285792 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/renderer/api_test_base_unittest.cc')
-rw-r--r-- | extensions/renderer/api_test_base_unittest.cc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/extensions/renderer/api_test_base_unittest.cc b/extensions/renderer/api_test_base_unittest.cc new file mode 100644 index 0000000..953d7b5 --- /dev/null +++ b/extensions/renderer/api_test_base_unittest.cc @@ -0,0 +1,34 @@ +// Copyright 2014 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 "extensions/renderer/api_test_base.h" + +namespace extensions { + +class ApiTestBaseTest : public ApiTestBase { + public: + virtual void SetUp() OVERRIDE { ApiTestBase::SetUp(); } +}; + +TEST_F(ApiTestBaseTest, TestEnvironment) { + RunTest("api_test_base_unittest.js", "testEnvironment"); +} + +TEST_F(ApiTestBaseTest, TestPromisesRun) { + RunTest("api_test_base_unittest.js", "testPromisesRun"); +} + +TEST_F(ApiTestBaseTest, TestCommonModulesAreAvailable) { + RunTest("api_test_base_unittest.js", "testCommonModulesAreAvailable"); +} + +TEST_F(ApiTestBaseTest, TestMojoModulesAreAvailable) { + RunTest("api_test_base_unittest.js", "testMojoModulesAreAvailable"); +} + +TEST_F(ApiTestBaseTest, TestTestBindings) { + RunTest("api_test_base_unittest.js", "testTestBindings"); +} + +} // namespace extensions |