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

Side by Side Diff: content/renderer/v8_value_converter_impl_unittest.cc

Issue 686523002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <cmath> 5 #include <cmath>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/test/values_test_util.h" 9 #include "base/test/values_test_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 converter_->avoid_identity_hash_for_testing_ = false; 44 converter_->avoid_identity_hash_for_testing_ = false;
45 } 45 }
46 46
47 class V8ValueConverterImplTest : public testing::Test { 47 class V8ValueConverterImplTest : public testing::Test {
48 public: 48 public:
49 V8ValueConverterImplTest() 49 V8ValueConverterImplTest()
50 : isolate_(v8::Isolate::GetCurrent()) { 50 : isolate_(v8::Isolate::GetCurrent()) {
51 } 51 }
52 52
53 protected: 53 protected:
54 virtual void SetUp() { 54 void SetUp() override {
55 v8::HandleScope handle_scope(isolate_); 55 v8::HandleScope handle_scope(isolate_);
56 v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(isolate_); 56 v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(isolate_);
57 context_.Reset(isolate_, v8::Context::New(isolate_, NULL, global)); 57 context_.Reset(isolate_, v8::Context::New(isolate_, NULL, global));
58 } 58 }
59 59
60 virtual void TearDown() { 60 void TearDown() override { context_.Reset(); }
61 context_.Reset();
62 }
63 61
64 std::string GetString(base::DictionaryValue* value, const std::string& key) { 62 std::string GetString(base::DictionaryValue* value, const std::string& key) {
65 std::string temp; 63 std::string temp;
66 if (!value->GetString(key, &temp)) { 64 if (!value->GetString(key, &temp)) {
67 ADD_FAILURE(); 65 ADD_FAILURE();
68 return std::string(); 66 return std::string();
69 } 67 }
70 return temp; 68 return temp;
71 } 69 }
72 70
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 EXPECT_TRUE( 866 EXPECT_TRUE(
869 base::Value::Equals(reference_number_value.get(), number_value.get())); 867 base::Value::Equals(reference_number_value.get(), number_value.get()));
870 868
871 v8::Handle<v8::Primitive> undefined(v8::Undefined(isolate_)); 869 v8::Handle<v8::Primitive> undefined(v8::Undefined(isolate_));
872 scoped_ptr<base::Value> undefined_value( 870 scoped_ptr<base::Value> undefined_value(
873 converter.FromV8Value(undefined, context)); 871 converter.FromV8Value(undefined, context));
874 EXPECT_FALSE(undefined_value); 872 EXPECT_FALSE(undefined_value);
875 } 873 }
876 874
877 } // namespace content 875 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698