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

Side by Side Diff: content/child/v8_value_converter_impl_unittest.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase 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
OLDNEW
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 "content/child/v8_value_converter_impl.h" 5 #include "content/child/v8_value_converter_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <cmath> 10 #include <cmath>
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 std::unique_ptr<base::Value>()); 407 std::unique_ptr<base::Value>());
408 TestWeirdType(converter, v8::Date::New(isolate_, 1000), 408 TestWeirdType(converter, v8::Date::New(isolate_, 1000),
409 base::Value::Type::DICTIONARY, 409 base::Value::Type::DICTIONARY,
410 std::unique_ptr<base::Value>(new base::DictionaryValue())); 410 std::unique_ptr<base::Value>(new base::DictionaryValue()));
411 TestWeirdType(converter, regex, base::Value::Type::DICTIONARY, 411 TestWeirdType(converter, regex, base::Value::Type::DICTIONARY,
412 std::unique_ptr<base::Value>(new base::DictionaryValue())); 412 std::unique_ptr<base::Value>(new base::DictionaryValue()));
413 413
414 converter.SetDateAllowed(true); 414 converter.SetDateAllowed(true);
415 TestWeirdType(converter, v8::Date::New(isolate_, 1000), 415 TestWeirdType(converter, v8::Date::New(isolate_, 1000),
416 base::Value::Type::DOUBLE, 416 base::Value::Type::DOUBLE,
417 std::unique_ptr<base::Value>(new base::FundamentalValue(1.0))); 417 std::unique_ptr<base::Value>(new base::Value(1.0)));
418 418
419 converter.SetRegExpAllowed(true); 419 converter.SetRegExpAllowed(true);
420 TestWeirdType(converter, regex, base::Value::Type::STRING, 420 TestWeirdType(converter, regex, base::Value::Type::STRING,
421 std::unique_ptr<base::Value>(new base::StringValue("/./"))); 421 std::unique_ptr<base::Value>(new base::StringValue("/./")));
422 } 422 }
423 423
424 TEST_F(V8ValueConverterImplTest, Prototype) { 424 TEST_F(V8ValueConverterImplTest, Prototype) {
425 v8::HandleScope handle_scope(isolate_); 425 v8::HandleScope handle_scope(isolate_);
426 v8::Local<v8::Context> context = 426 v8::Local<v8::Context> context =
427 v8::Local<v8::Context>::New(isolate_, context_); 427 v8::Local<v8::Context>::New(isolate_, context_);
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 EXPECT_TRUE( 1172 EXPECT_TRUE(
1173 base::Value::Equals(reference_number_value.get(), number_value.get())); 1173 base::Value::Equals(reference_number_value.get(), number_value.get()));
1174 1174
1175 v8::Local<v8::Primitive> undefined(v8::Undefined(isolate_)); 1175 v8::Local<v8::Primitive> undefined(v8::Undefined(isolate_));
1176 std::unique_ptr<base::Value> undefined_value( 1176 std::unique_ptr<base::Value> undefined_value(
1177 converter.FromV8Value(undefined, context)); 1177 converter.FromV8Value(undefined, context));
1178 EXPECT_FALSE(undefined_value); 1178 EXPECT_FALSE(undefined_value);
1179 } 1179 }
1180 1180
1181 } // namespace content 1181 } // namespace content
OLDNEW
« no previous file with comments | « content/child/v8_value_converter_impl.cc ('k') | content/common/android/gin_java_bridge_value_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698