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

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

Issue 2817533003: Replace ASSERT, RELEASE_ASSERT, and ASSERT_NOT_REACHED in bindings (Closed)
Patch Set: fixed dcheck build error Created 3 years, 8 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/ScriptPromiseResolver.h" 5 #include "bindings/core/v8/ScriptPromiseResolver.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "bindings/core/v8/ScriptFunction.h" 9 #include "bindings/core/v8/ScriptFunction.h"
10 #include "bindings/core/v8/ScriptValue.h" 10 #include "bindings/core/v8/ScriptValue.h"
(...skipping 14 matching lines...) Expand all
25 String* value) { 25 String* value) {
26 Function* self = new Function(script_state, value); 26 Function* self = new Function(script_state, value);
27 return self->BindToV8Function(); 27 return self->BindToV8Function();
28 } 28 }
29 29
30 private: 30 private:
31 Function(ScriptState* script_state, String* value) 31 Function(ScriptState* script_state, String* value)
32 : ScriptFunction(script_state), value_(value) {} 32 : ScriptFunction(script_state), value_(value) {}
33 33
34 ScriptValue Call(ScriptValue value) override { 34 ScriptValue Call(ScriptValue value) override {
35 ASSERT(!value.IsEmpty()); 35 DCHECK(!value.IsEmpty());
36 *value_ = ToCoreString(value.V8Value() 36 *value_ = ToCoreString(value.V8Value()
37 ->ToString(GetScriptState()->GetContext()) 37 ->ToString(GetScriptState()->GetContext())
38 .ToLocalChecked()); 38 .ToLocalChecked());
39 return value; 39 return value;
40 } 40 }
41 41
42 String* value_; 42 String* value_;
43 }; 43 };
44 44
45 class ScriptPromiseResolverTest : public ::testing::Test { 45 class ScriptPromiseResolverTest : public ::testing::Test {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 resolver->Reject(); 347 resolver->Reject();
348 v8::MicrotasksScope::PerformCheckpoint(GetIsolate()); 348 v8::MicrotasksScope::PerformCheckpoint(GetIsolate());
349 349
350 EXPECT_EQ(String(), on_fulfilled); 350 EXPECT_EQ(String(), on_fulfilled);
351 EXPECT_EQ("undefined", on_rejected); 351 EXPECT_EQ("undefined", on_rejected);
352 } 352 }
353 353
354 } // namespace 354 } // namespace
355 355
356 } // namespace blink 356 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698