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

Side by Side Diff: Source/core/dom/MainThreadTaskRunnerTest.cpp

Issue 1171323003: Fix unit test style in core/{dom,editing,html}/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: whitespace fix Created 5 years, 6 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 | « Source/core/dom/DocumentTest.cpp ('k') | Source/core/dom/NthIndexCacheTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2013 Google Inc. All Rights Reserved. 3 * Copyright (C) 2013 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 19 matching lines...) Expand all
30 30
31 #include "core/dom/ExecutionContextTask.h" 31 #include "core/dom/ExecutionContextTask.h"
32 #include "core/testing/NullExecutionContext.h" 32 #include "core/testing/NullExecutionContext.h"
33 #include "platform/heap/Handle.h" 33 #include "platform/heap/Handle.h"
34 #include "platform/testing/UnitTestHelpers.h" 34 #include "platform/testing/UnitTestHelpers.h"
35 #include "wtf/Forward.h" 35 #include "wtf/Forward.h"
36 #include "wtf/OwnPtr.h" 36 #include "wtf/OwnPtr.h"
37 #include "wtf/PassOwnPtr.h" 37 #include "wtf/PassOwnPtr.h"
38 #include <gtest/gtest.h> 38 #include <gtest/gtest.h>
39 39
40 using namespace blink; 40 namespace blink {
41
42 namespace {
43 41
44 class MarkingBooleanTask final : public ExecutionContextTask { 42 class MarkingBooleanTask final : public ExecutionContextTask {
45 public: 43 public:
46 static PassOwnPtr<MarkingBooleanTask> create(bool* toBeMarked) 44 static PassOwnPtr<MarkingBooleanTask> create(bool* toBeMarked)
47 { 45 {
48 return adoptPtr(new MarkingBooleanTask(toBeMarked)); 46 return adoptPtr(new MarkingBooleanTask(toBeMarked));
49 } 47 }
50 48
51 49
52 virtual ~MarkingBooleanTask() { } 50 virtual ~MarkingBooleanTask() { }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 OwnPtr<MainThreadTaskRunner> runner = MainThreadTaskRunner::create(context.g et()); 96 OwnPtr<MainThreadTaskRunner> runner = MainThreadTaskRunner::create(context.g et());
99 bool isMarked = false; 97 bool isMarked = false;
100 98
101 context->setTasksNeedSuspension(true); 99 context->setTasksNeedSuspension(true);
102 runner->postTask(FROM_HERE, MarkingBooleanTask::create(&isMarked)); 100 runner->postTask(FROM_HERE, MarkingBooleanTask::create(&isMarked));
103 runner.clear(); 101 runner.clear();
104 blink::testing::runPendingTasks(); 102 blink::testing::runPendingTasks();
105 EXPECT_FALSE(isMarked); 103 EXPECT_FALSE(isMarked);
106 } 104 }
107 105
108 } 106 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentTest.cpp ('k') | Source/core/dom/NthIndexCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698