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

Side by Side Diff: ceee/ie/broker/window_events_funnel_unittest.cc

Issue 6248026: Rename Real* to Double* in values.* and dependent files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More renames Created 9 years, 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // Unit tests for WindowEventsFunnel. 5 // Unit tests for WindowEventsFunnel.
6 6
7 // MockWin32 can't be included after ChromeFrameHost because of an include 7 // MockWin32 can't be included after ChromeFrameHost because of an include
8 // incompatibility with atlwin.h. 8 // incompatibility with atlwin.h.
9 #include "ceee/testing/utils/mock_win32.h" // NOLINT 9 #include "ceee/testing/utils/mock_win32.h" // NOLINT
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 }; 48 };
49 49
50 TEST(WindowEventsFunnelTest, SendEvent) { 50 TEST(WindowEventsFunnelTest, SendEvent) {
51 TestWindowEventsFunnel events_funnel; 51 TestWindowEventsFunnel events_funnel;
52 52
53 static const char* kEventName = "MADness"; 53 static const char* kEventName = "MADness";
54 DictionaryValue event_args; 54 DictionaryValue event_args;
55 event_args.SetInteger("Answer to the Ultimate Question of Life," 55 event_args.SetInteger("Answer to the Ultimate Question of Life,"
56 "the Universe, and Everything", 42); 56 "the Universe, and Everything", 42);
57 event_args.SetString("AYBABTU", "All your base are belong to us"); 57 event_args.SetString("AYBABTU", "All your base are belong to us");
58 event_args.SetReal("www.unrealtournament.com", 3.0); 58 event_args.SetDouble("www.unrealtournament.com", 3.0);
59 59
60 ListValue args_list; 60 ListValue args_list;
61 args_list.Append(event_args.DeepCopy()); 61 args_list.Append(event_args.DeepCopy());
62 62
63 std::string event_args_str; 63 std::string event_args_str;
64 base::JSONWriter::Write(&args_list, false, &event_args_str); 64 base::JSONWriter::Write(&args_list, false, &event_args_str);
65 65
66 class MockChromePostman : public ChromePostman { 66 class MockChromePostman : public ChromePostman {
67 public: 67 public:
68 MOCK_METHOD2(FireEvent, void(const char*, const char*)); 68 MOCK_METHOD2(FireEvent, void(const char*, const char*));
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 HWND window = reinterpret_cast<HWND>(window_id); 148 HWND window = reinterpret_cast<HWND>(window_id);
149 149
150 scoped_ptr<Value> args(Value::CreateIntegerValue(window_id)); 150 scoped_ptr<Value> args(Value::CreateIntegerValue(window_id));
151 EXPECT_CALL(window_events_funnel, SendEvent( 151 EXPECT_CALL(window_events_funnel, SendEvent(
152 StrEq(ext_event_names::kOnWindowRemoved), ValuesEqual(args.get()))). 152 StrEq(ext_event_names::kOnWindowRemoved), ValuesEqual(args.get()))).
153 WillOnce(Return(S_OK)); 153 WillOnce(Return(S_OK));
154 EXPECT_HRESULT_SUCCEEDED(window_events_funnel.OnRemoved(window)); 154 EXPECT_HRESULT_SUCCEEDED(window_events_funnel.OnRemoved(window));
155 } 155 }
156 156
157 } // namespace 157 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698