| 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 "base/pickle.h" | 5 #include "base/pickle.h" |
| 6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
| 7 #include "third_party/WebKit/public/web/WebCursorInfo.h" | 7 #include "third_party/WebKit/public/web/WebCursorInfo.h" |
| 8 #include "webkit/common/cursors/webcursor.h" | 8 #include "webkit/common/cursors/webcursor.h" |
| 9 | 9 |
| 10 using WebKit::WebCursorInfo; | 10 using blink::WebCursorInfo; |
| 11 | 11 |
| 12 TEST(WebCursorTest, OKCursorSerialization) { | 12 TEST(WebCursorTest, OKCursorSerialization) { |
| 13 WebCursor custom_cursor; | 13 WebCursor custom_cursor; |
| 14 // This is a valid custom cursor. | 14 // This is a valid custom cursor. |
| 15 Pickle ok_custom_pickle; | 15 Pickle ok_custom_pickle; |
| 16 // Type and hotspots. | 16 // Type and hotspots. |
| 17 ok_custom_pickle.WriteInt(WebCursorInfo::TypeCustom); | 17 ok_custom_pickle.WriteInt(WebCursorInfo::TypeCustom); |
| 18 ok_custom_pickle.WriteInt(0); | 18 ok_custom_pickle.WriteInt(0); |
| 19 ok_custom_pickle.WriteInt(0); | 19 ok_custom_pickle.WriteInt(0); |
| 20 // X & Y | 20 // X & Y |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 PickleIterator iter(ok_custom_pickle); | 235 PickleIterator iter(ok_custom_pickle); |
| 236 EXPECT_TRUE(custom_cursor.Deserialize(&iter)); | 236 EXPECT_TRUE(custom_cursor.Deserialize(&iter)); |
| 237 | 237 |
| 238 #if defined(TOOLKIT_GTK) | 238 #if defined(TOOLKIT_GTK) |
| 239 // On GTK+ using platforms, we should get a real native GdkCursor object back | 239 // On GTK+ using platforms, we should get a real native GdkCursor object back |
| 240 // (and the memory used should automatically be freed by the WebCursor object | 240 // (and the memory used should automatically be freed by the WebCursor object |
| 241 // for valgrind tests). | 241 // for valgrind tests). |
| 242 EXPECT_TRUE(custom_cursor.GetCustomCursor()); | 242 EXPECT_TRUE(custom_cursor.GetCustomCursor()); |
| 243 #endif | 243 #endif |
| 244 } | 244 } |
| OLD | NEW |