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

Side by Side Diff: third_party/WebKit/Source/core/testing/DictionaryTest.cpp

Issue 2724243002: Replace ASSERT and ASSERT_NOT_REACHED with DCHECK and NOTREACHED in core/testing/. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/testing/DummyPageHolder.cpp » ('j') | 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 "core/testing/DictionaryTest.h" 5 #include "core/testing/DictionaryTest.h"
6 6
7 #include "bindings/core/v8/ScriptState.h" 7 #include "bindings/core/v8/ScriptState.h"
8 #include "bindings/core/v8/V8ObjectBuilder.h" 8 #include "bindings/core/v8/V8ObjectBuilder.h"
9 #include "core/testing/InternalDictionary.h" 9 #include "core/testing/InternalDictionary.h"
10 #include "core/testing/InternalDictionaryDerived.h" 10 #include "core/testing/InternalDictionaryDerived.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 return ScriptValue(); 130 return ScriptValue();
131 V8ObjectBuilder builder(scriptState); 131 V8ObjectBuilder builder(scriptState);
132 HashMap<String, String> properties = m_dictionaryMemberProperties.get(); 132 HashMap<String, String> properties = m_dictionaryMemberProperties.get();
133 for (HashMap<String, String>::iterator it = properties.begin(); 133 for (HashMap<String, String>::iterator it = properties.begin();
134 it != properties.end(); ++it) 134 it != properties.end(); ++it)
135 builder.addString(it->key, it->value); 135 builder.addString(it->key, it->value);
136 return builder.scriptValue(); 136 return builder.scriptValue();
137 } 137 }
138 138
139 void DictionaryTest::setDerived(const InternalDictionaryDerived& derived) { 139 void DictionaryTest::setDerived(const InternalDictionaryDerived& derived) {
140 ASSERT(derived.hasRequiredBooleanMember()); 140 DCHECK(derived.hasRequiredBooleanMember());
141 set(derived); 141 set(derived);
142 if (derived.hasDerivedStringMember()) 142 if (derived.hasDerivedStringMember())
143 m_derivedStringMember = derived.derivedStringMember(); 143 m_derivedStringMember = derived.derivedStringMember();
144 m_derivedStringMemberWithDefault = derived.derivedStringMemberWithDefault(); 144 m_derivedStringMemberWithDefault = derived.derivedStringMemberWithDefault();
145 m_requiredBooleanMember = derived.requiredBooleanMember(); 145 m_requiredBooleanMember = derived.requiredBooleanMember();
146 } 146 }
147 147
148 void DictionaryTest::getDerived(InternalDictionaryDerived& result) { 148 void DictionaryTest::getDerived(InternalDictionaryDerived& result) {
149 get(result); 149 get(result);
150 result.setDerivedStringMember(m_derivedStringMember); 150 result.setDerivedStringMember(m_derivedStringMember);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 227
228 DEFINE_TRACE(DictionaryTest) { 228 DEFINE_TRACE(DictionaryTest) {
229 visitor->trace(m_elementMember); 229 visitor->trace(m_elementMember);
230 visitor->trace(m_elementOrNullMember); 230 visitor->trace(m_elementOrNullMember);
231 visitor->trace(m_doubleOrStringSequenceMember); 231 visitor->trace(m_doubleOrStringSequenceMember);
232 visitor->trace(m_eventTargetOrNullMember); 232 visitor->trace(m_eventTargetOrNullMember);
233 } 233 }
234 234
235 } // namespace blink 235 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/testing/DummyPageHolder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698