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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptPromisePropertyTest.cpp

Issue 2595543003: Rename toV8(...) function in Blink to ToV8(...). (Closed)
Patch Set: Rebasing... Created 3 years, 11 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
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 "bindings/core/v8/ScriptPromiseProperty.h" 5 #include "bindings/core/v8/ScriptPromiseProperty.h"
6 6
7 #include "bindings/core/v8/DOMWrapperWorld.h" 7 #include "bindings/core/v8/DOMWrapperWorld.h"
8 #include "bindings/core/v8/ScriptFunction.h" 8 #include "bindings/core/v8/ScriptFunction.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 return StubFunction::createFunction(scriptState, value, callCount); 137 return StubFunction::createFunction(scriptState, value, callCount);
138 } 138 }
139 139
140 template <typename T> 140 template <typename T>
141 ScriptValue wrap(DOMWrapperWorld& world, const T& value) { 141 ScriptValue wrap(DOMWrapperWorld& world, const T& value) {
142 v8::HandleScope handleScope(isolate()); 142 v8::HandleScope handleScope(isolate());
143 ScriptState* scriptState = 143 ScriptState* scriptState =
144 ScriptState::from(toV8Context(&document(), world)); 144 ScriptState::from(toV8Context(&document(), world));
145 ScriptState::Scope scope(scriptState); 145 ScriptState::Scope scope(scriptState);
146 return ScriptValue( 146 return ScriptValue(
147 scriptState, toV8(value, scriptState->context()->Global(), isolate())); 147 scriptState, ToV8(value, scriptState->context()->Global(), isolate()));
148 } 148 }
149 149
150 private: 150 private:
151 std::unique_ptr<DummyPageHolder> m_page; 151 std::unique_ptr<DummyPageHolder> m_page;
152 RefPtr<ScriptState> m_otherScriptState; 152 RefPtr<ScriptState> m_otherScriptState;
153 }; 153 };
154 154
155 // This is the main test class. 155 // This is the main test class.
156 // If you want to examine a testcase independent of holder types, place the 156 // If you want to examine a testcase independent of holder types, place the
157 // test on this class. 157 // test on this class.
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 ResolveWithString) { 476 ResolveWithString) {
477 test(String("hello"), "hello", __FILE__, __LINE__); 477 test(String("hello"), "hello", __FILE__, __LINE__);
478 } 478 }
479 479
480 TEST_F(ScriptPromisePropertyNonScriptWrappableResolutionTargetTest, 480 TEST_F(ScriptPromisePropertyNonScriptWrappableResolutionTargetTest,
481 ResolveWithInteger) { 481 ResolveWithInteger) {
482 test(-1, "-1", __FILE__, __LINE__); 482 test(-1, "-1", __FILE__, __LINE__);
483 } 483 }
484 484
485 } // namespace 485 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698