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

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

Issue 259033002: [Android] Implement renderer side of Gin Java Bridge (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, conflicts resolved Created 6 years, 6 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 | « content/renderer/v8_value_converter_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 return true; 725 return true;
726 } 726 }
727 virtual bool FromV8Array(v8::Handle<v8::Array> value, 727 virtual bool FromV8Array(v8::Handle<v8::Array> value,
728 base::Value** out, 728 base::Value** out,
729 v8::Isolate* isolate, 729 v8::Isolate* isolate,
730 const FromV8ValueCallback& callback) const OVERRIDE { 730 const FromV8ValueCallback& callback) const OVERRIDE {
731 *out = NewReferenceValue(); 731 *out = NewReferenceValue();
732 return true; 732 return true;
733 } 733 }
734 virtual bool FromV8ArrayBuffer(v8::Handle<v8::Object> value, 734 virtual bool FromV8ArrayBuffer(v8::Handle<v8::Object> value,
735 base::Value** out) const OVERRIDE { 735 base::Value** out,
736 v8::Isolate* isolate) const OVERRIDE {
736 *out = NewReferenceValue(); 737 *out = NewReferenceValue();
737 return true; 738 return true;
738 } 739 }
739 virtual bool FromV8Number(v8::Handle<v8::Number> value, 740 virtual bool FromV8Number(v8::Handle<v8::Number> value,
740 base::Value** out) const OVERRIDE { 741 base::Value** out) const OVERRIDE {
741 *out = NewReferenceValue(); 742 *out = NewReferenceValue();
742 return true; 743 return true;
743 } 744 }
744 virtual bool FromV8Undefined(base::Value** out) const OVERRIDE { 745 virtual bool FromV8Undefined(base::Value** out) const OVERRIDE {
745 *out = NewReferenceValue(); 746 *out = NewReferenceValue();
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 const FromV8ValueCallback& callback) const OVERRIDE { 816 const FromV8ValueCallback& callback) const OVERRIDE {
816 return false; 817 return false;
817 } 818 }
818 virtual bool FromV8Array(v8::Handle<v8::Array> value, 819 virtual bool FromV8Array(v8::Handle<v8::Array> value,
819 base::Value** out, 820 base::Value** out,
820 v8::Isolate* isolate, 821 v8::Isolate* isolate,
821 const FromV8ValueCallback& callback) const OVERRIDE { 822 const FromV8ValueCallback& callback) const OVERRIDE {
822 return false; 823 return false;
823 } 824 }
824 virtual bool FromV8ArrayBuffer(v8::Handle<v8::Object> value, 825 virtual bool FromV8ArrayBuffer(v8::Handle<v8::Object> value,
825 base::Value** out) const OVERRIDE { 826 base::Value** out,
827 v8::Isolate* isolate) const OVERRIDE {
826 return false; 828 return false;
827 } 829 }
828 virtual bool FromV8Number(v8::Handle<v8::Number> value, 830 virtual bool FromV8Number(v8::Handle<v8::Number> value,
829 base::Value** out) const OVERRIDE { 831 base::Value** out) const OVERRIDE {
830 return false; 832 return false;
831 } 833 }
832 virtual bool FromV8Undefined(base::Value** out) const OVERRIDE { 834 virtual bool FromV8Undefined(base::Value** out) const OVERRIDE {
833 return false; 835 return false;
834 } 836 }
835 }; 837 };
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 EXPECT_TRUE( 872 EXPECT_TRUE(
871 base::Value::Equals(reference_number_value.get(), number_value.get())); 873 base::Value::Equals(reference_number_value.get(), number_value.get()));
872 874
873 v8::Handle<v8::Primitive> undefined(v8::Undefined(isolate_)); 875 v8::Handle<v8::Primitive> undefined(v8::Undefined(isolate_));
874 scoped_ptr<base::Value> undefined_value( 876 scoped_ptr<base::Value> undefined_value(
875 converter.FromV8Value(undefined, context)); 877 converter.FromV8Value(undefined, context));
876 EXPECT_FALSE(undefined_value); 878 EXPECT_FALSE(undefined_value);
877 } 879 }
878 880
879 } // namespace content 881 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/v8_value_converter_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698