Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: extensions/renderer/api/mojo_private/mojo_private_unittest.cc

Issue 2409073002: Use mojo from the PDF extension instead of using an extension API.
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/renderer/BUILD.gn ('k') | extensions/renderer/api_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api/mojo_private/mojo_private_unittest.cc
diff --git a/extensions/renderer/api/mojo_private/mojo_private_unittest.cc b/extensions/renderer/api/mojo_private/mojo_private_unittest.cc
deleted file mode 100644
index 344cbe9da6c5d2f556af0c42b7f23e898c2f77b8..0000000000000000000000000000000000000000
--- a/extensions/renderer/api/mojo_private/mojo_private_unittest.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2015 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"
-
-#include "base/macros.h"
-#include "gin/modules/module_registry.h"
-
-// A test launcher for tests for the mojoPrivate API defined in
-// extensions/test/data/mojo_private_unittest.js.
-
-namespace extensions {
-
-class MojoPrivateApiTest : public ApiTestBase {
- public:
- MojoPrivateApiTest() = default;
-
- gin::ModuleRegistry* module_registry() {
- return gin::ModuleRegistry::From(env()->context()->v8_context());
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MojoPrivateApiTest);
-};
-
-TEST_F(MojoPrivateApiTest, Define) {
- ASSERT_NO_FATAL_FAILURE(RunTest("mojo_private_unittest.js", "testDefine"));
- EXPECT_EQ(1u, module_registry()->available_modules().count("testModule"));
-}
-
-TEST_F(MojoPrivateApiTest, DefineRegistersModule) {
- ASSERT_NO_FATAL_FAILURE(
- RunTest("mojo_private_unittest.js", "testDefineRegistersModule"));
- EXPECT_EQ(1u, module_registry()->available_modules().count("testModule"));
- EXPECT_EQ(1u, module_registry()->available_modules().count("dependency"));
-}
-
-TEST_F(MojoPrivateApiTest, DefineModuleDoesNotExist) {
- ASSERT_NO_FATAL_FAILURE(
- RunTest("mojo_private_unittest.js", "testDefineModuleDoesNotExist"));
- EXPECT_EQ(0u, module_registry()->available_modules().count("testModule"));
- EXPECT_EQ(0u,
- module_registry()->available_modules().count("does not exist!"));
- EXPECT_EQ(1u, module_registry()->unsatisfied_dependencies().count(
- "does not exist!"));
-}
-
-TEST_F(MojoPrivateApiTest, RequireAsync) {
- ASSERT_NO_FATAL_FAILURE(
- RunTest("mojo_private_unittest.js", "testRequireAsync"));
-}
-
-TEST_F(MojoPrivateApiTest, DefineAndRequire) {
- ASSERT_NO_FATAL_FAILURE(
- RunTest("mojo_private_unittest.js", "testDefineAndRequire"));
-}
-
-} // namespace extensions
« no previous file with comments | « extensions/renderer/BUILD.gn ('k') | extensions/renderer/api_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698