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

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: fixes 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
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 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);
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 PickleIterator iter(ok_custom_pickle); 221 PickleIterator iter(ok_custom_pickle);
222 EXPECT_TRUE(custom_cursor.Deserialize(&iter)); 222 EXPECT_TRUE(custom_cursor.Deserialize(&iter));
223 223
224 #if defined(TOOLKIT_GTK) 224 #if defined(TOOLKIT_GTK)
225 // On GTK+ using platforms, we should get a real native GdkCursor object back 225 // 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 226 // (and the memory used should automatically be freed by the WebCursor object
227 // for valgrind tests). 227 // for valgrind tests).
228 EXPECT_TRUE(custom_cursor.GetCustomCursor()); 228 EXPECT_TRUE(custom_cursor.GetCustomCursor());
229 #endif 229 #endif
230 } 230 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698