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

Side by Side Diff: test/cctest/test-libplatform-default-platform.cc

Issue 526043002: Refactor libplatform unit tests to use GTest/GMock. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Integrate into test driver. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-libplatform.h ('k') | test/cctest/test-libplatform-task-queue.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 the V8 project 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 "src/v8.h"
6
7 #include "src/libplatform/default-platform.h"
8 #include "test/cctest/cctest.h"
9 #include "test/cctest/test-libplatform.h"
10
11 using namespace v8::internal;
12 using namespace v8::platform;
13
14
15 TEST(DefaultPlatformMessagePump) {
16 TaskCounter task_counter;
17
18 DefaultPlatform platform;
19
20 TestTask* task = new TestTask(&task_counter, true);
21
22 CHECK(!platform.PumpMessageLoop(CcTest::isolate()));
23
24 platform.CallOnForegroundThread(CcTest::isolate(), task);
25
26 CHECK_EQ(1, task_counter.GetCount());
27 CHECK(platform.PumpMessageLoop(CcTest::isolate()));
28 CHECK_EQ(0, task_counter.GetCount());
29 CHECK(!platform.PumpMessageLoop(CcTest::isolate()));
30 }
OLDNEW
« no previous file with comments | « test/cctest/test-libplatform.h ('k') | test/cctest/test-libplatform-task-queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698