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 "config.h" | 5 #include "config.h" |
6 #include "bindings/core/v8/V8Binding.h" | 6 #include "bindings/core/v8/V8Binding.h" |
7 | 7 |
8 #include "core/testing/GarbageCollectedScriptWrappable.h" | 8 #include "core/testing/GarbageCollectedScriptWrappable.h" |
9 #include "core/testing/RefCountedScriptWrappable.h" | 9 #include "core/testing/RefCountedScriptWrappable.h" |
10 #include "platform/heap/Heap.h" | 10 #include "platform/heap/Heap.h" |
11 #include "wtf/Vector.h" | 11 #include "wtf/Vector.h" |
12 | 12 |
13 #include <gtest/gtest.h> | 13 #include <gtest/gtest.h> |
14 #include <v8.h> | 14 #include <v8.h> |
15 | 15 |
16 #define CHECK_TOV8VALUE(expected, value) check(expected, value, __FILE__, __LINE
__) | 16 #define CHECK_TOV8VALUE(expected, value) check(expected, value, __FILE__, __LINE
__) |
17 | 17 |
18 namespace WebCore { | 18 namespace blink { |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 class V8ValueTraitsTest : public ::testing::Test { | 22 class V8ValueTraitsTest : public ::testing::Test { |
23 public: | 23 public: |
24 | 24 |
25 V8ValueTraitsTest() | 25 V8ValueTraitsTest() |
26 : m_scope(v8::Isolate::GetCurrent()) | 26 : m_scope(v8::Isolate::GetCurrent()) |
27 { | 27 { |
28 } | 28 } |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 { | 188 { |
189 v8::Local<v8::Value> localValue(v8::Number::New(m_scope.isolate(), 1234)); | 189 v8::Local<v8::Value> localValue(v8::Number::New(m_scope.isolate(), 1234)); |
190 v8::Handle<v8::Value> handleValue(v8::Number::New(m_scope.isolate(), 5678)); | 190 v8::Handle<v8::Value> handleValue(v8::Number::New(m_scope.isolate(), 5678)); |
191 | 191 |
192 CHECK_TOV8VALUE("1234", localValue); | 192 CHECK_TOV8VALUE("1234", localValue); |
193 CHECK_TOV8VALUE("5678", handleValue); | 193 CHECK_TOV8VALUE("5678", handleValue); |
194 } | 194 } |
195 | 195 |
196 } // namespace | 196 } // namespace |
197 | 197 |
198 } // namespace WebCore | 198 } // namespace blink |
OLD | NEW |