summaryrefslogtreecommitdiffstats
path: root/mojo/edk/js/test
diff options
context:
space:
mode:
authorblundell <blundell@chromium.org>2015-01-19 09:18:33 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-19 17:19:27 +0000
commit70fb54767b472a5edfb859e489beeeec7abdb0e4 (patch)
tree28e534ec774391a9f6571a1770e12a0d63ebf833 /mojo/edk/js/test
parentba5f0233fa38f949e24f6274ba891fa652eab640 (diff)
downloadchromium_src-70fb54767b472a5edfb859e489beeeec7abdb0e4.zip
chromium_src-70fb54767b472a5edfb859e489beeeec7abdb0e4.tar.gz
chromium_src-70fb54767b472a5edfb859e489beeeec7abdb0e4.tar.bz2
Move //mojo/{public, edk} underneath //third_party
This CL move //mojo/public and //mojo/edk to live in the following locations: - //third_party/mojo/src/mojo/public - //third_party/mojo/src/mojo/edk It moves the related gypfiles from //mojo to //third_party/mojo and updates them as necessary to account for the file moves. It also updates clients of the mojo SDK and EDK targets in both GYP and GN. (Note that for GN, the mojo SDK and EDK build systems are maintained in the Mojo repo and designed to be flexible wrt the location of the SDK/EDK in a client repo, so no changes are needed. This CL does not update include paths to the code being moved to limit the number of moving parts, instead relying on the include_dirs that the SDK and EDK targets supply to their direct dependents to ensure that include paths continue to resolve correctly. NOPRESUBMIT=true Review URL: https://codereview.chromium.org/814543006 Cr-Commit-Position: refs/heads/master@{#312129}
Diffstat (limited to 'mojo/edk/js/test')
-rw-r--r--mojo/edk/js/test/BUILD.gn41
-rw-r--r--mojo/edk/js/test/hexdump.js34
-rw-r--r--mojo/edk/js/test/run_js_integration_tests.cc57
-rw-r--r--mojo/edk/js/test/run_js_tests.cc62
4 files changed, 0 insertions, 194 deletions
diff --git a/mojo/edk/js/test/BUILD.gn b/mojo/edk/js/test/BUILD.gn
deleted file mode 100644
index badc3ad..0000000
--- a/mojo/edk/js/test/BUILD.gn
+++ /dev/null
@@ -1,41 +0,0 @@
-# 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.
-
-test("js_unittests") {
- deps = [
- "../../js",
- "../../js:js_unittests",
- "../../test:run_all_unittests",
- "../../test:test_support",
- "../../../public/cpp/environment",
- "../../../public/cpp/system",
- "../../../public/cpp/utility",
- "../../../public/interfaces/bindings/tests:test_interfaces",
- "//base",
- "//gin:gin_test",
- "//mojo/environment:chromium",
- ]
-
- sources = [
- "run_js_tests.cc",
- ]
-}
-
-test("js_integration_tests") {
- deps = [
- "../../js",
- "../../js/tests:js_to_cpp_tests",
- "../../test:run_all_unittests",
- "../../test:test_support",
- "../../../public/cpp/bindings",
- "../../../public/interfaces/bindings/tests:test_interfaces",
- "//base",
- "//gin:gin_test",
- "//mojo/environment:chromium",
- ]
-
- sources = [
- "run_js_integration_tests.cc",
- ]
-}
diff --git a/mojo/edk/js/test/hexdump.js b/mojo/edk/js/test/hexdump.js
deleted file mode 100644
index b36c47f..0000000
--- a/mojo/edk/js/test/hexdump.js
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2013 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.
-
-define(function() {
- function hexify(value, length) {
- var hex = value.toString(16);
- while (hex.length < length)
- hex = "0" + hex;
- return hex;
- }
-
- function dumpArray(bytes) {
- var dumped = "";
- for (var i = 0; i < bytes.length; ++i) {
- dumped += hexify(bytes[i], 2);
-
- if (i % 16 == 15) {
- dumped += "\n";
- continue;
- }
-
- if (i % 2 == 1)
- dumped += " ";
- if (i % 8 == 7)
- dumped += " ";
- }
- return dumped;
- }
-
- var exports = {};
- exports.dumpArray = dumpArray;
- return exports;
-});
diff --git a/mojo/edk/js/test/run_js_integration_tests.cc b/mojo/edk/js/test/run_js_integration_tests.cc
deleted file mode 100644
index 1a6f1d6..0000000
--- a/mojo/edk/js/test/run_js_integration_tests.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// 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 "base/files/file_path.h"
-#include "base/path_service.h"
-#include "gin/modules/console.h"
-#include "gin/modules/module_registry.h"
-#include "gin/modules/timer.h"
-#include "gin/test/file_runner.h"
-#include "gin/test/gtest.h"
-#include "mojo/edk/js/core.h"
-#include "mojo/edk/js/support.h"
-#include "mojo/edk/js/threading.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace mojo {
-namespace js {
-namespace {
-
-class TestRunnerDelegate : public gin::FileRunnerDelegate {
- public:
- TestRunnerDelegate() {
- AddBuiltinModule(gin::Console::kModuleName, gin::Console::GetModule);
- AddBuiltinModule(Core::kModuleName, Core::GetModule);
- AddBuiltinModule(gin::TimerModule::kName, gin::TimerModule::GetModule);
- AddBuiltinModule(Threading::kModuleName, Threading::GetModule);
- }
- private:
- DISALLOW_COPY_AND_ASSIGN(TestRunnerDelegate);
-};
-
-void RunTest(std::string test, bool addSupportModule) {
- base::FilePath path;
- PathService::Get(base::DIR_SOURCE_ROOT, &path);
- path = path.AppendASCII("mojo")
- .AppendASCII("edk")
- .AppendASCII("js")
- .AppendASCII("tests")
- .AppendASCII(test);
- TestRunnerDelegate delegate;
- if (addSupportModule)
- delegate.AddBuiltinModule(Support::kModuleName, Support::GetModule);
- gin::RunTestFromFile(path, &delegate, true);
-}
-
-TEST(JSTest, connection) {
- RunTest("connection_tests.js", false);
-}
-
-TEST(JSTest, sample_service) {
- RunTest("sample_service_tests.js", true);
-}
-
-} // namespace
-} // namespace js
-} // namespace mojo
diff --git a/mojo/edk/js/test/run_js_tests.cc b/mojo/edk/js/test/run_js_tests.cc
deleted file mode 100644
index b574902..0000000
--- a/mojo/edk/js/test/run_js_tests.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// 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 "base/files/file_path.h"
-#include "base/path_service.h"
-#include "gin/modules/console.h"
-#include "gin/modules/module_registry.h"
-#include "gin/test/file_runner.h"
-#include "gin/test/gtest.h"
-#include "mojo/edk/js/core.h"
-#include "mojo/edk/js/support.h"
-#include "mojo/public/cpp/environment/environment.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace mojo {
-namespace js {
-namespace {
-
-class TestRunnerDelegate : public gin::FileRunnerDelegate {
- public:
- TestRunnerDelegate() {
- AddBuiltinModule(gin::Console::kModuleName, gin::Console::GetModule);
- AddBuiltinModule(Core::kModuleName, Core::GetModule);
- AddBuiltinModule(Support::kModuleName, Support::GetModule);
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TestRunnerDelegate);
-};
-
-void RunTest(std::string test, bool run_until_idle) {
- base::FilePath path;
- PathService::Get(base::DIR_SOURCE_ROOT, &path);
- path = path.AppendASCII("mojo")
- .AppendASCII("public")
- .AppendASCII("js")
- .AppendASCII(test);
- TestRunnerDelegate delegate;
- gin::RunTestFromFile(path, &delegate, run_until_idle);
-}
-
-// TODO(abarth): Should we autogenerate these stubs from GYP?
-TEST(JSTest, core) {
- RunTest("core_unittests.js", true);
-}
-
-TEST(JSTest, codec) {
- RunTest("codec_unittests.js", true);
-}
-
-TEST(JSTest, struct) {
- RunTest("struct_unittests.js", true);
-}
-
-TEST(JSTest, validation) {
- RunTest("validation_unittests.js", true);
-}
-
-} // namespace
-} // namespace js
-} // namespace mojo