diff options
author | jam <jam@chromium.org> | 2016-03-03 15:11:54 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-03 23:13:21 +0000 |
commit | baaeb815d807659fc7fe9b8cba2cc3b4d20018bf (patch) | |
tree | 5763d074a5369c6c4d2d25dc935fb07bacdc5fc3 /url/run_all_unittests.cc | |
parent | fd4a7725b4762877ef29c50bf2e0095e8d26fe39 (diff) | |
download | chromium_src-baaeb815d807659fc7fe9b8cba2cc3b4d20018bf.zip chromium_src-baaeb815d807659fc7fe9b8cba2cc3b4d20018bf.tar.gz chromium_src-baaeb815d807659fc7fe9b8cba2cc3b4d20018bf.tar.bz2 |
Add mojo struct traits for GURL so that it can be sent over mojoms.
The motivation for adding a structtraits for GURL, as opposed to using paramtraits, is that most probably we'll be passing urls to languages other than C++.
BUG=586194
Review URL: https://codereview.chromium.org/1760643004
Cr-Commit-Position: refs/heads/master@{#379128}
Diffstat (limited to 'url/run_all_unittests.cc')
-rw-r--r-- | url/run_all_unittests.cc | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/url/run_all_unittests.cc b/url/run_all_unittests.cc new file mode 100644 index 0000000..b3bdcc2 --- /dev/null +++ b/url/run_all_unittests.cc @@ -0,0 +1,35 @@ +// Copyright 2016 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/bind.h" +#include "base/message_loop/message_loop.h" +#include "base/test/launcher/unit_test_launcher.h" +#include "base/test/test_io_thread.h" +#include "base/test/test_suite.h" +#include "build/build_config.h" +#include "mojo/edk/embedder/embedder.h" +#include "mojo/edk/test/scoped_ipc_support.h" + +#if defined(OS_ANDROID) +#include "base/android/jni_android.h" +#include "base/test/test_file_util.h" +#endif + +int main(int argc, char** argv) { +#if defined(OS_ANDROID) + JNIEnv* env = base::android::AttachCurrentThread(); + base::RegisterContentUriTestUtils(env); +#endif + base::TestSuite test_suite(argc, argv); + + mojo::edk::Init(); + base::TestIOThread test_io_thread(base::TestIOThread::kAutoStart); + scoped_ptr<mojo::edk::test::ScopedIPCSupport> ipc_support; + ipc_support.reset( + new mojo::edk::test::ScopedIPCSupport(test_io_thread.task_runner())); + + return base::LaunchUnitTests( + argc, argv, + base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); +} |