| OLD | NEW |
| 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/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
| 10 #include "core/testing/InternalDictionary.h" | 10 #include "core/testing/InternalDictionary.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 while (iterator.Next(execution_context, exception_state)) { | 183 while (iterator.Next(execution_context, exception_state)) { |
| 184 if (exception_state.HadException()) | 184 if (exception_state.HadException()) |
| 185 return g_empty_string; | 185 return g_empty_string; |
| 186 | 186 |
| 187 if (first_loop) | 187 if (first_loop) |
| 188 first_loop = false; | 188 first_loop = false; |
| 189 else | 189 else |
| 190 result.Append(','); | 190 result.Append(','); |
| 191 | 191 |
| 192 v8::Local<v8::Value> value; | 192 v8::Local<v8::Value> value; |
| 193 if (V8Call(iterator.GetValue(), value)) | 193 if (iterator.GetValue().ToLocal(&value)) |
| 194 result.Append(ToCoreString(value->ToString())); | 194 result.Append(ToCoreString(value->ToString())); |
| 195 } | 195 } |
| 196 | 196 |
| 197 return result.ToString(); | 197 return result.ToString(); |
| 198 } | 198 } |
| 199 | 199 |
| 200 void DictionaryTest::Reset() { | 200 void DictionaryTest::Reset() { |
| 201 long_member_ = nullptr; | 201 long_member_ = nullptr; |
| 202 long_member_with_clamp_ = nullptr; | 202 long_member_with_clamp_ = nullptr; |
| 203 long_member_with_enforce_range_ = nullptr; | 203 long_member_with_enforce_range_ = nullptr; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 230 } | 230 } |
| 231 | 231 |
| 232 DEFINE_TRACE(DictionaryTest) { | 232 DEFINE_TRACE(DictionaryTest) { |
| 233 visitor->Trace(element_member_); | 233 visitor->Trace(element_member_); |
| 234 visitor->Trace(element_or_null_member_); | 234 visitor->Trace(element_or_null_member_); |
| 235 visitor->Trace(double_or_string_sequence_member_); | 235 visitor->Trace(double_or_string_sequence_member_); |
| 236 visitor->Trace(event_target_or_null_member_); | 236 visitor->Trace(event_target_or_null_member_); |
| 237 } | 237 } |
| 238 | 238 |
| 239 } // namespace blink | 239 } // namespace blink |
| OLD | NEW |