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

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

Issue 633573004: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/core/dom (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/core/dom/LiveNodeList.h ('k') | Source/core/dom/MessageChannel.h » ('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 23 matching lines...) Expand all
34 #include "platform/heap/Handle.h" 34 #include "platform/heap/Handle.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 using namespace blink;
41 41
42 namespace { 42 namespace {
43 43
44 class MarkingBooleanTask FINAL : public ExecutionContextTask { 44 class MarkingBooleanTask final : public ExecutionContextTask {
45 public: 45 public:
46 static PassOwnPtr<MarkingBooleanTask> create(bool* toBeMarked) 46 static PassOwnPtr<MarkingBooleanTask> create(bool* toBeMarked)
47 { 47 {
48 return adoptPtr(new MarkingBooleanTask(toBeMarked)); 48 return adoptPtr(new MarkingBooleanTask(toBeMarked));
49 } 49 }
50 50
51 51
52 virtual ~MarkingBooleanTask() { } 52 virtual ~MarkingBooleanTask() { }
53 53
54 private: 54 private:
55 MarkingBooleanTask(bool* toBeMarked) : m_toBeMarked(toBeMarked) { } 55 MarkingBooleanTask(bool* toBeMarked) : m_toBeMarked(toBeMarked) { }
56 56
57 virtual void performTask(ExecutionContext* context) OVERRIDE 57 virtual void performTask(ExecutionContext* context) override
58 { 58 {
59 *m_toBeMarked = true; 59 *m_toBeMarked = true;
60 } 60 }
61 61
62 bool* m_toBeMarked; 62 bool* m_toBeMarked;
63 }; 63 };
64 64
65 TEST(MainThreadTaskRunnerTest, PostTask) 65 TEST(MainThreadTaskRunnerTest, PostTask)
66 { 66 {
67 RefPtrWillBeRawPtr<NullExecutionContext> context = adoptRefWillBeNoop(new Nu llExecutionContext()); 67 RefPtrWillBeRawPtr<NullExecutionContext> context = adoptRefWillBeNoop(new Nu llExecutionContext());
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 bool isMarked = false; 99 bool isMarked = false;
100 100
101 context->setTasksNeedSuspension(true); 101 context->setTasksNeedSuspension(true);
102 runner->postTask(MarkingBooleanTask::create(&isMarked)); 102 runner->postTask(MarkingBooleanTask::create(&isMarked));
103 runner.clear(); 103 runner.clear();
104 blink::testing::runPendingTasks(); 104 blink::testing::runPendingTasks();
105 EXPECT_FALSE(isMarked); 105 EXPECT_FALSE(isMarked);
106 } 106 }
107 107
108 } 108 }
OLDNEW
« no previous file with comments | « Source/core/dom/LiveNodeList.h ('k') | Source/core/dom/MessageChannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698