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

Side by Side Diff: gin/modules/timer_unittest.cc

Issue 639833004: change more OVERRIDE instances to override in gin/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 | « gin/modules/timer.h ('k') | gin/public/v8_platform.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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gin/modules/timer.h" 5 #include "gin/modules/timer.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "gin/handle.h" 9 #include "gin/handle.h"
10 #include "gin/object_template_builder.h" 10 #include "gin/object_template_builder.h"
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 35
36 private: 36 private:
37 Result() : count_(0) { 37 Result() : count_(0) {
38 } 38 }
39 39
40 virtual ~Result() { 40 virtual ~Result() {
41 } 41 }
42 42
43 virtual ObjectTemplateBuilder GetObjectTemplateBuilder( 43 virtual ObjectTemplateBuilder GetObjectTemplateBuilder(
44 v8::Isolate* isolate) OVERRIDE { 44 v8::Isolate* isolate) override {
45 return Wrappable<Result>::GetObjectTemplateBuilder(isolate) 45 return Wrappable<Result>::GetObjectTemplateBuilder(isolate)
46 .SetProperty("count", &Result::count, &Result::set_count) 46 .SetProperty("count", &Result::count, &Result::set_count)
47 .SetMethod("quit", &Result::Quit); 47 .SetMethod("quit", &Result::Quit);
48 } 48 }
49 49
50 int count_; 50 int count_;
51 }; 51 };
52 52
53 WrapperInfo Result::kWrapperInfo = { gin::kEmbedderNativeGin }; 53 WrapperInfo Result::kWrapperInfo = { gin::kEmbedderNativeGin };
54 54
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // Destroy runner, which should destroy the timer object we created. 146 // Destroy runner, which should destroy the timer object we created.
147 helper.QuitSoon(); 147 helper.QuitSoon();
148 helper.runner.reset(NULL); 148 helper.runner.reset(NULL);
149 helper.loop.Run(); 149 helper.loop.Run();
150 150
151 // Timer should not have run because it was deleted. 151 // Timer should not have run because it was deleted.
152 EXPECT_EQ(0, helper.result->count()); 152 EXPECT_EQ(0, helper.result->count());
153 } 153 }
154 154
155 } // namespace gin 155 } // namespace gin
OLDNEW
« no previous file with comments | « gin/modules/timer.h ('k') | gin/public/v8_platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698