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

Side by Side Diff: content/common/cursors/webcursor_unittest.cc

Issue 201473002: Move webcursors code from webkit/ to content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gfx image include Created 6 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 | Annotate | Revision Log
« no previous file with comments | « content/common/cursors/webcursor_null.cc ('k') | content/common/cursors/webcursor_win.cc » ('j') | 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 "base/pickle.h" 5 #include "base/pickle.h"
6 #include "content/common/cursors/webcursor.h"
6 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
7 #include "third_party/WebKit/public/platform/WebCursorInfo.h" 8 #include "third_party/WebKit/public/platform/WebCursorInfo.h"
8 #include "webkit/common/cursors/webcursor.h"
9 9
10 using blink::WebCursorInfo; 10 using blink::WebCursorInfo;
11 11
12 namespace content {
13
12 TEST(WebCursorTest, OKCursorSerialization) { 14 TEST(WebCursorTest, OKCursorSerialization) {
13 WebCursor custom_cursor; 15 WebCursor custom_cursor;
14 // This is a valid custom cursor. 16 // This is a valid custom cursor.
15 Pickle ok_custom_pickle; 17 Pickle ok_custom_pickle;
16 // Type and hotspots. 18 // Type and hotspots.
17 ok_custom_pickle.WriteInt(WebCursorInfo::TypeCustom); 19 ok_custom_pickle.WriteInt(WebCursorInfo::TypeCustom);
18 ok_custom_pickle.WriteInt(0); 20 ok_custom_pickle.WriteInt(0);
19 ok_custom_pickle.WriteInt(0); 21 ok_custom_pickle.WriteInt(0);
20 // X & Y 22 // X & Y
21 ok_custom_pickle.WriteInt(1); 23 ok_custom_pickle.WriteInt(1);
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 PickleIterator iter(ok_custom_pickle); 223 PickleIterator iter(ok_custom_pickle);
222 EXPECT_TRUE(custom_cursor.Deserialize(&iter)); 224 EXPECT_TRUE(custom_cursor.Deserialize(&iter));
223 225
224 #if defined(TOOLKIT_GTK) 226 #if defined(TOOLKIT_GTK)
225 // On GTK+ using platforms, we should get a real native GdkCursor object back 227 // On GTK+ using platforms, we should get a real native GdkCursor object back
226 // (and the memory used should automatically be freed by the WebCursor object 228 // (and the memory used should automatically be freed by the WebCursor object
227 // for valgrind tests). 229 // for valgrind tests).
228 EXPECT_TRUE(custom_cursor.GetCustomCursor()); 230 EXPECT_TRUE(custom_cursor.GetCustomCursor());
229 #endif 231 #endif
230 } 232 }
233
234 } // namespace content
OLDNEW
« no previous file with comments | « content/common/cursors/webcursor_null.cc ('k') | content/common/cursors/webcursor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698