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

Side by Side Diff: mojo/public/cpp/bindings/tests/wtf_test_base.cc

Issue 1751563002: Mojo C++ bindings: support mapping mojo string to WTF::String. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "mojo/public/cpp/bindings/tests/wtf_test_base.h"
6
7 #include "third_party/WebKit/Source/wtf/CurrentTime.h"
8 #include "third_party/WebKit/Source/wtf/MainThread.h"
9 #include "third_party/WebKit/Source/wtf/Partitions.h"
10 #include "third_party/WebKit/Source/wtf/WTF.h"
11
12 namespace mojo {
13 namespace test {
14 namespace {
15
16 double DummyGetCurrentTime() {
17 return 0.0;
18 }
19
20 bool g_wtf_initialized = false;
21
22 } // namespace
23
24 WTFTestBase::~WTFTestBase() {}
25
26 WTFTestBase::WTFTestBase() {}
27
28 void WTFTestBase::SetUp() {
29 if (g_wtf_initialized)
30 return;
31
32 WTF::Partitions::initialize(nullptr);
33 WTF::setTimeFunctionsForTesting(DummyGetCurrentTime);
34 WTF::initialize(nullptr);
35 WTF::initializeMainThread(0);
36 g_wtf_initialized = true;
haraken 2016/03/07 23:54:17 Can we use blink::initializeWithoutV8/shutdownWith
yzshen1 2016/03/08 00:17:09 I tried it, but that requires to link against the
haraken 2016/03/08 00:29:29 Then can we add a public API (in public/platform/)
37 }
38
39 } // namespace test
40 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/wtf_test_base.h ('k') | mojo/public/cpp/bindings/tests/wtf_types_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698