| Index: third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializerTest.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializerTest.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializerTest.cpp
|
| index 932dae42a6b7a89825971621a869bb1378935a28..3f464e395e28e0204f31d418ce656721174a839a 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializerTest.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializerTest.cpp
|
| @@ -7,6 +7,7 @@
|
| #include "bindings/core/v8/ScriptController.h"
|
| #include "core/layout/LayoutTestHelper.h"
|
| #include "platform/testing/HistogramTester.h"
|
| +#include "wtf/Alignment.h"
|
|
|
| namespace blink {
|
|
|
| @@ -43,4 +44,16 @@ TEST_F(ScriptValueSerializerTest, ValueCountHistograms)
|
| "Blink.ScriptValueSerializer.DOMWrapperCount", 1, 1);
|
| }
|
|
|
| +TEST_F(ScriptValueSerializerTest, Uint64Decode)
|
| +{
|
| + // Even large 64-bit integers should decode properly.
|
| + const uint64_t expected = 0x123456789abcdef0;
|
| + WTF_ALIGNED(const uint8_t, buffer[], sizeof(UChar)) = { 0xf0, 0xbd, 0xf3, 0xd5, 0x89, 0xcf, 0x95, 0x9a, 0x92, 0x00 };
|
| + BlobDataHandleMap blobDataHandleMap;
|
| + SerializedScriptValueReader reader(buffer, sizeof(buffer), nullptr, blobDataHandleMap, ScriptState::forMainWorld(document().frame()));
|
| + uint64_t actual;
|
| + ASSERT_TRUE(reader.doReadUint64(&actual));
|
| + EXPECT_EQ(expected, actual);
|
| +}
|
| +
|
| } // namespace blink
|
|
|