summaryrefslogtreecommitdiffstats
path: root/mojo/edk/test
diff options
context:
space:
mode:
authorjamesr <jamesr@chromium.org>2014-11-13 15:36:42 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-13 23:37:35 +0000
commit184f354ddeff66784515ddbbee9c46355cadab6a (patch)
treeb19c2b86b9d05c08e640d0a79cb38d427b204eae /mojo/edk/test
parent4da4d40742403e9a9cad302473f4dce1745a149f (diff)
downloadchromium_src-184f354ddeff66784515ddbbee9c46355cadab6a.zip
chromium_src-184f354ddeff66784515ddbbee9c46355cadab6a.tar.gz
chromium_src-184f354ddeff66784515ddbbee9c46355cadab6a.tar.bz2
Update mojo sdk to rev afb4440fd5a10cba980878c326180b7ad7960480
TBR=jam@chromium.org Review URL: https://codereview.chromium.org/728553002 Cr-Commit-Position: refs/heads/master@{#304114}
Diffstat (limited to 'mojo/edk/test')
-rw-r--r--mojo/edk/test/BUILD.gn2
-rw-r--r--mojo/edk/test/multiprocess_test_helper.cc4
-rw-r--r--mojo/edk/test/multiprocess_test_helper.h3
-rw-r--r--mojo/edk/test/run_all_unittests.cc3
-rw-r--r--mojo/edk/test/test_support_impl.cc3
-rw-r--r--mojo/edk/test/test_utils_win.cc39
6 files changed, 20 insertions, 34 deletions
diff --git a/mojo/edk/test/BUILD.gn b/mojo/edk/test/BUILD.gn
index e5d53b5..38a631b 100644
--- a/mojo/edk/test/BUILD.gn
+++ b/mojo/edk/test/BUILD.gn
@@ -56,6 +56,8 @@ source_set("test_support_impl") {
testonly = true
deps = [
"//base",
+ "//base/test:test_support",
+ "//mojo/public/c/test_support",
]
sources = [
diff --git a/mojo/edk/test/multiprocess_test_helper.cc b/mojo/edk/test/multiprocess_test_helper.cc
index 02367d6..30aa0be 100644
--- a/mojo/edk/test/multiprocess_test_helper.cc
+++ b/mojo/edk/test/multiprocess_test_helper.cc
@@ -60,8 +60,8 @@ int MultiprocessTestHelper::WaitForChildShutdown() {
CHECK_NE(test_child_handle_, base::kNullProcessHandle);
int rv = -1;
- CHECK(base::WaitForExitCodeWithTimeout(
- test_child_handle_, &rv, TestTimeouts::action_timeout()));
+ CHECK(base::WaitForExitCodeWithTimeout(test_child_handle_, &rv,
+ TestTimeouts::action_timeout()));
base::CloseProcessHandle(test_child_handle_);
test_child_handle_ = base::kNullProcessHandle;
return rv;
diff --git a/mojo/edk/test/multiprocess_test_helper.h b/mojo/edk/test/multiprocess_test_helper.h
index 6b2713f..d131460 100644
--- a/mojo/edk/test/multiprocess_test_helper.h
+++ b/mojo/edk/test/multiprocess_test_helper.h
@@ -7,8 +7,7 @@
#include <string>
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/process/process_handle.h"
#include "base/test/multiprocess_test.h"
#include "base/test/test_timeouts.h"
diff --git a/mojo/edk/test/run_all_unittests.cc b/mojo/edk/test/run_all_unittests.cc
index c66ea50..166a73e 100644
--- a/mojo/edk/test/run_all_unittests.cc
+++ b/mojo/edk/test/run_all_unittests.cc
@@ -21,7 +21,6 @@ int main(int argc, char** argv) {
mojo::test::TestSupport::Init(new mojo::test::TestSupportImpl());
return base::LaunchUnitTests(
- argc,
- argv,
+ argc, argv,
base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
}
diff --git a/mojo/edk/test/test_support_impl.cc b/mojo/edk/test/test_support_impl.cc
index 2a86331..fae3a8f 100644
--- a/mojo/edk/test/test_support_impl.cc
+++ b/mojo/edk/test/test_support_impl.cc
@@ -56,8 +56,7 @@ FILE* TestSupportImpl::OpenSourceRootRelativeFile(const char* relative_path) {
char** TestSupportImpl::EnumerateSourceRootRelativeDirectory(
const char* relative_path) {
std::vector<std::string> names;
- base::FileEnumerator e(ResolveSourceRootRelativePath(relative_path),
- false,
+ base::FileEnumerator e(ResolveSourceRootRelativePath(relative_path), false,
base::FileEnumerator::FILES);
for (base::FilePath name = e.Next(); !name.empty(); name = e.Next())
names.push_back(name.BaseName().AsUTF8Unsafe());
diff --git a/mojo/edk/test/test_utils_win.cc b/mojo/edk/test/test_utils_win.cc
index 5d5b942..2387945 100644
--- a/mojo/edk/test/test_utils_win.cc
+++ b/mojo/edk/test/test_utils_win.cc
@@ -23,14 +23,11 @@ bool BlockingWrite(const embedder::PlatformHandle& handle,
OVERLAPPED overlapped = {0};
DWORD bytes_written_dword = 0;
- if (!WriteFile(handle.handle,
- buffer,
- static_cast<DWORD>(bytes_to_write),
- &bytes_written_dword,
- &overlapped)) {
+ if (!WriteFile(handle.handle, buffer, static_cast<DWORD>(bytes_to_write),
+ &bytes_written_dword, &overlapped)) {
if (GetLastError() != ERROR_IO_PENDING ||
- !GetOverlappedResult(
- handle.handle, &overlapped, &bytes_written_dword, TRUE)) {
+ !GetOverlappedResult(handle.handle, &overlapped, &bytes_written_dword,
+ TRUE)) {
return false;
}
}
@@ -46,14 +43,11 @@ bool BlockingRead(const embedder::PlatformHandle& handle,
OVERLAPPED overlapped = {0};
DWORD bytes_read_dword = 0;
- if (!ReadFile(handle.handle,
- buffer,
- static_cast<DWORD>(buffer_size),
- &bytes_read_dword,
- &overlapped)) {
+ if (!ReadFile(handle.handle, buffer, static_cast<DWORD>(buffer_size),
+ &bytes_read_dword, &overlapped)) {
if (GetLastError() != ERROR_IO_PENDING ||
- !GetOverlappedResult(
- handle.handle, &overlapped, &bytes_read_dword, TRUE)) {
+ !GetOverlappedResult(handle.handle, &overlapped, &bytes_read_dword,
+ TRUE)) {
return false;
}
}
@@ -69,18 +63,15 @@ bool NonBlockingRead(const embedder::PlatformHandle& handle,
OVERLAPPED overlapped = {0};
DWORD bytes_read_dword = 0;
- if (!ReadFile(handle.handle,
- buffer,
- static_cast<DWORD>(buffer_size),
- &bytes_read_dword,
- &overlapped)) {
+ if (!ReadFile(handle.handle, buffer, static_cast<DWORD>(buffer_size),
+ &bytes_read_dword, &overlapped)) {
if (GetLastError() != ERROR_IO_PENDING)
return false;
CancelIo(handle.handle);
- if (!GetOverlappedResult(
- handle.handle, &overlapped, &bytes_read_dword, TRUE)) {
+ if (!GetOverlappedResult(handle.handle, &overlapped, &bytes_read_dword,
+ TRUE)) {
*bytes_read = 0;
return true;
}
@@ -97,11 +88,7 @@ embedder::ScopedPlatformHandle PlatformHandleFromFILE(base::ScopedFILE fp) {
PCHECK(DuplicateHandle(
GetCurrentProcess(),
reinterpret_cast<HANDLE>(_get_osfhandle(_fileno(fp.get()))),
- GetCurrentProcess(),
- &rv,
- 0,
- TRUE,
- DUPLICATE_SAME_ACCESS))
+ GetCurrentProcess(), &rv, 0, TRUE, DUPLICATE_SAME_ACCESS))
<< "DuplicateHandle";
return embedder::ScopedPlatformHandle(embedder::PlatformHandle(rv));
}