OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <cmath> | 5 #include <cmath> |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/test/values_test_util.h" | 9 #include "base/test/values_test_util.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 v8::HandleScope handle_scope(isolate_); | 358 v8::HandleScope handle_scope(isolate_); |
359 v8::Context::Scope context_scope(isolate_, context_); | 359 v8::Context::Scope context_scope(isolate_, context_); |
360 | 360 |
361 v8::Handle<v8::RegExp> regex( | 361 v8::Handle<v8::RegExp> regex( |
362 v8::RegExp::New(v8::String::New("."), v8::RegExp::kNone)); | 362 v8::RegExp::New(v8::String::New("."), v8::RegExp::kNone)); |
363 | 363 |
364 V8ValueConverterImpl converter; | 364 V8ValueConverterImpl converter; |
365 TestWeirdType(converter, | 365 TestWeirdType(converter, |
366 v8::Undefined(), | 366 v8::Undefined(), |
367 base::Value::TYPE_NULL, // Arbitrary type, result is NULL. | 367 base::Value::TYPE_NULL, // Arbitrary type, result is NULL. |
368 scoped_ptr<base::Value>(NULL)); | 368 scoped_ptr<base::Value>()); |
369 TestWeirdType(converter, | 369 TestWeirdType(converter, |
370 v8::Date::New(1000), | 370 v8::Date::New(1000), |
371 base::Value::TYPE_DICTIONARY, | 371 base::Value::TYPE_DICTIONARY, |
372 scoped_ptr<base::Value>(new base::DictionaryValue())); | 372 scoped_ptr<base::Value>(new base::DictionaryValue())); |
373 TestWeirdType(converter, | 373 TestWeirdType(converter, |
374 regex, | 374 regex, |
375 base::Value::TYPE_DICTIONARY, | 375 base::Value::TYPE_DICTIONARY, |
376 scoped_ptr<base::Value>(new base::DictionaryValue())); | 376 scoped_ptr<base::Value>(new base::DictionaryValue())); |
377 | 377 |
378 converter.SetDateAllowed(true); | 378 converter.SetDateAllowed(true); |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 ASSERT_TRUE(current->GetAsDictionary(¤t_as_object)) << i; | 669 ASSERT_TRUE(current->GetAsDictionary(¤t_as_object)) << i; |
670 ASSERT_TRUE(current_as_object->Get(kKey, ¤t)) << i; | 670 ASSERT_TRUE(current_as_object->Get(kKey, ¤t)) << i; |
671 } | 671 } |
672 | 672 |
673 // The leaf node shouldn't have any properties. | 673 // The leaf node shouldn't have any properties. |
674 base::DictionaryValue empty; | 674 base::DictionaryValue empty; |
675 EXPECT_TRUE(Value::Equals(&empty, current)) << *current; | 675 EXPECT_TRUE(Value::Equals(&empty, current)) << *current; |
676 } | 676 } |
677 | 677 |
678 } // namespace content | 678 } // namespace content |
OLD | NEW |