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

Side by Side Diff: Source/bindings/v8/ScriptPromiseResolverTest.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/ScriptProfiler.cpp ('k') | Source/bindings/v8/ScriptValue.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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 v8::Handle<v8::Context> context(m_context.newLocal(m_isolate)); 58 v8::Handle<v8::Context> context(m_context.newLocal(m_isolate));
59 V8PerContextDataHolder::install(context, DOMWrapperWorld::current(m_isol ate)); 59 V8PerContextDataHolder::install(context, DOMWrapperWorld::current(m_isol ate));
60 m_perContextData = V8PerContextData::create(context); 60 m_perContextData = V8PerContextData::create(context);
61 m_perContextData->init(); 61 m_perContextData->init();
62 m_promise = ScriptPromise::createPending(); 62 m_promise = ScriptPromise::createPending();
63 m_resolver = ScriptPromiseResolver::create(m_promise); 63 m_resolver = ScriptPromiseResolver::create(m_promise);
64 } 64 }
65 65
66 void TearDown() 66 void TearDown()
67 { 67 {
68 m_resolver = 0; 68 m_resolver = nullptr;
69 m_promise.clear(); 69 m_promise.clear();
70 m_perContextData.clear(); 70 m_perContextData.clear();
71 } 71 }
72 72
73 V8PromiseCustom::PromiseState state() 73 V8PromiseCustom::PromiseState state()
74 { 74 {
75 return V8PromiseCustom::getState(V8PromiseCustom::getInternal(promise()) ); 75 return V8PromiseCustom::getState(V8PromiseCustom::getInternal(promise()) );
76 } 76 }
77 77
78 v8::Local<v8::Value> result() 78 v8::Local<v8::Value> result()
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 m_resolver->reject(ScriptValue(v8::Integer::New(m_isolate, 4), m_isolate)); 167 m_resolver->reject(ScriptValue(v8::Integer::New(m_isolate, 4), m_isolate));
168 EXPECT_FALSE(m_resolver->isPending()); 168 EXPECT_FALSE(m_resolver->isPending());
169 EXPECT_EQ(V8PromiseCustom::Fulfilled, state()); 169 EXPECT_EQ(V8PromiseCustom::Fulfilled, state());
170 ASSERT_TRUE(result()->IsNumber()); 170 ASSERT_TRUE(result()->IsNumber());
171 EXPECT_EQ(3, result().As<v8::Integer>()->Value()); 171 EXPECT_EQ(3, result().As<v8::Integer>()->Value());
172 } 172 }
173 173
174 } // namespace 174 } // namespace
175 175
176 } // namespace WebCore 176 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/ScriptProfiler.cpp ('k') | Source/bindings/v8/ScriptValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698