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

Side by Side Diff: extensions/renderer/module_system_test.cc

Issue 753523002: remove some calls to to-be-deprecated v8::Value::To* functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « content/shell/renderer/test_runner/web_ax_object_proxy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/renderer/module_system_test.h" 5 #include "extensions/renderer/module_system_test.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 "AssertFalse", 73 "AssertFalse",
74 base::Bind(&AssertNatives::AssertFalse, base::Unretained(this))); 74 base::Bind(&AssertNatives::AssertFalse, base::Unretained(this)));
75 } 75 }
76 76
77 bool assertion_made() { return assertion_made_; } 77 bool assertion_made() { return assertion_made_; }
78 bool failed() { return failed_; } 78 bool failed() { return failed_; }
79 79
80 void AssertTrue(const v8::FunctionCallbackInfo<v8::Value>& args) { 80 void AssertTrue(const v8::FunctionCallbackInfo<v8::Value>& args) {
81 CHECK_EQ(1, args.Length()); 81 CHECK_EQ(1, args.Length());
82 assertion_made_ = true; 82 assertion_made_ = true;
83 failed_ = failed_ || !args[0]->ToBoolean()->Value(); 83 failed_ = failed_ || !args[0]->ToBoolean(args.GetIsolate())->Value();
84 } 84 }
85 85
86 void AssertFalse(const v8::FunctionCallbackInfo<v8::Value>& args) { 86 void AssertFalse(const v8::FunctionCallbackInfo<v8::Value>& args) {
87 CHECK_EQ(1, args.Length()); 87 CHECK_EQ(1, args.Length());
88 assertion_made_ = true; 88 assertion_made_ = true;
89 failed_ = failed_ || args[0]->ToBoolean()->Value(); 89 failed_ = failed_ || args[0]->ToBoolean(args.GetIsolate())->Value();
90 } 90 }
91 91
92 private: 92 private:
93 bool assertion_made_; 93 bool assertion_made_;
94 bool failed_; 94 bool failed_;
95 }; 95 };
96 96
97 // Source map that operates on std::strings. 97 // Source map that operates on std::strings.
98 class ModuleSystemTestEnvironment::StringSourceMap 98 class ModuleSystemTestEnvironment::StringSourceMap
99 : public ModuleSystem::SourceMap { 99 : public ModuleSystem::SourceMap {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 void ModuleSystemTest::ExpectNoAssertionsMade() { 247 void ModuleSystemTest::ExpectNoAssertionsMade() {
248 should_assertions_be_made_ = false; 248 should_assertions_be_made_ = false;
249 } 249 }
250 250
251 void ModuleSystemTest::RunResolvedPromises() { 251 void ModuleSystemTest::RunResolvedPromises() {
252 isolate_->RunMicrotasks(); 252 isolate_->RunMicrotasks();
253 } 253 }
254 254
255 } // namespace extensions 255 } // namespace extensions
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/web_ax_object_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698