| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "extensions/renderer/api_test_base.h" | 5 #include "extensions/renderer/api_test_base.h" |
| 6 | 6 |
| 7 #include "gin/modules/module_registry.h" | 7 #include "gin/modules/module_registry.h" |
| 8 | 8 |
| 9 // A test launcher for tests for the mojoPrivate API defined in | 9 // A test launcher for tests for the mojoPrivate API defined in |
| 10 // extensions/test/data/mojo_private_unittest.js. | 10 // extensions/test/data/mojo_private_unittest.js. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 TEST_F(MojoPrivateApiTest, DefineModuleDoesNotExist) { | 38 TEST_F(MojoPrivateApiTest, DefineModuleDoesNotExist) { |
| 39 ASSERT_NO_FATAL_FAILURE( | 39 ASSERT_NO_FATAL_FAILURE( |
| 40 RunTest("mojo_private_unittest.js", "testDefineModuleDoesNotExist")); | 40 RunTest("mojo_private_unittest.js", "testDefineModuleDoesNotExist")); |
| 41 EXPECT_EQ(0u, module_registry()->available_modules().count("testModule")); | 41 EXPECT_EQ(0u, module_registry()->available_modules().count("testModule")); |
| 42 EXPECT_EQ(0u, | 42 EXPECT_EQ(0u, |
| 43 module_registry()->available_modules().count("does not exist!")); | 43 module_registry()->available_modules().count("does not exist!")); |
| 44 EXPECT_EQ(1u, module_registry()->unsatisfied_dependencies().count( | 44 EXPECT_EQ(1u, module_registry()->unsatisfied_dependencies().count( |
| 45 "does not exist!")); | 45 "does not exist!")); |
| 46 } | 46 } |
| 47 | 47 |
| 48 TEST_F(MojoPrivateApiTest, RequireAsync) { |
| 49 ASSERT_NO_FATAL_FAILURE( |
| 50 RunTest("mojo_private_unittest.js", "testRequireAsync")); |
| 51 } |
| 52 |
| 53 TEST_F(MojoPrivateApiTest, DefineAndRequire) { |
| 54 ASSERT_NO_FATAL_FAILURE( |
| 55 RunTest("mojo_private_unittest.js", "testDefineAndRequire")); |
| 56 } |
| 57 |
| 48 } // namespace extensions | 58 } // namespace extensions |
| OLD | NEW |