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

Side by Side Diff: base/win/message_window_unittest.cc

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « base/win/iunknown_impl_unittest.cc ('k') | base/win/object_watcher_unittest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/bind.h" 5 #include "base/bind.h"
6 #include "base/guid.h" 6 #include "base/guid.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/win/message_window.h" 8 #include "base/win/message_window.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gtest/googlemock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/googletest/include/gtest/gtest.h"
11 11
12 namespace base { 12 namespace base {
13 13
14 namespace { 14 namespace {
15 15
16 bool HandleMessage( 16 bool HandleMessage(
17 UINT message, WPARAM wparam, LPARAM lparam, LRESULT* result) { 17 UINT message, WPARAM wparam, LPARAM lparam, LRESULT* result) {
18 // Return |wparam| as the result of WM_USER message. 18 // Return |wparam| as the result of WM_USER message.
19 if (message == WM_USER) { 19 if (message == WM_USER) {
20 *result = wparam; 20 *result = wparam;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 string16 name = UTF8ToUTF16(base::GenerateGUID()); 52 string16 name = UTF8ToUTF16(base::GenerateGUID());
53 win::MessageWindow window; 53 win::MessageWindow window;
54 EXPECT_TRUE(window.CreateNamed(base::Bind(&HandleMessage), name)); 54 EXPECT_TRUE(window.CreateNamed(base::Bind(&HandleMessage), name));
55 55
56 HWND hwnd = win::MessageWindow::FindWindow(name); 56 HWND hwnd = win::MessageWindow::FindWindow(name);
57 EXPECT_TRUE(hwnd != NULL); 57 EXPECT_TRUE(hwnd != NULL);
58 EXPECT_EQ(SendMessage(hwnd, WM_USER, 200, 0), 200); 58 EXPECT_EQ(SendMessage(hwnd, WM_USER, 200, 0), 200);
59 } 59 }
60 60
61 } // namespace base 61 } // namespace base
OLDNEW
« no previous file with comments | « base/win/iunknown_impl_unittest.cc ('k') | base/win/object_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698