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

Side by Side Diff: components/browser_watcher/exit_funnel_win_unittest.cc

Issue 1056633004: Update {virtual,override} to follow C++11 style in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix logo tracker unittest. Created 5 years, 8 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 "components/browser_watcher/exit_funnel_win.h" 5 #include "components/browser_watcher/exit_funnel_win.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/process/process_handle.h" 10 #include "base/process/process_handle.h"
(...skipping 10 matching lines...) Expand all
21 21
22 namespace { 22 namespace {
23 23
24 const wchar_t kRegistryPath[] = L"Software\\ExitFunnelWinTest"; 24 const wchar_t kRegistryPath[] = L"Software\\ExitFunnelWinTest";
25 25
26 class ExitFunnelWinTest : public testing::Test { 26 class ExitFunnelWinTest : public testing::Test {
27 public: 27 public:
28 typedef testing::Test Super; 28 typedef testing::Test Super;
29 typedef std::map<base::string16, int64> EventMap; 29 typedef std::map<base::string16, int64> EventMap;
30 30
31 virtual void SetUp() override { 31 void SetUp() override {
32 Super::SetUp(); 32 Super::SetUp();
33 33
34 override_manager_.OverrideRegistry(HKEY_CURRENT_USER); 34 override_manager_.OverrideRegistry(HKEY_CURRENT_USER);
35 } 35 }
36 36
37 base::string16 GetEventSubkey() { 37 base::string16 GetEventSubkey() {
38 // There should be a single subkey named after this process' pid. 38 // There should be a single subkey named after this process' pid.
39 base::win::RegistryKeyIterator it(HKEY_CURRENT_USER, kRegistryPath); 39 base::win::RegistryKeyIterator it(HKEY_CURRENT_USER, kRegistryPath);
40 EXPECT_EQ(1, it.SubkeyCount()); 40 EXPECT_EQ(1, it.SubkeyCount());
41 41
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 base::TimeDelta one = base::TimeDelta::FromInternalValue(events[L"One"]); 108 base::TimeDelta one = base::TimeDelta::FromInternalValue(events[L"One"]);
109 base::TimeDelta two = base::TimeDelta::FromInternalValue(events[L"Two"]); 109 base::TimeDelta two = base::TimeDelta::FromInternalValue(events[L"Two"]);
110 110
111 // Sleep is not accurate, it may over or under sleep. To minimize flakes, 111 // Sleep is not accurate, it may over or under sleep. To minimize flakes,
112 // this test only compares relative ordering of the events. 112 // this test only compares relative ordering of the events.
113 ASSERT_LT(one, two); 113 ASSERT_LT(one, two);
114 } 114 }
115 115
116 } // namespace browser_watcher 116 } // namespace browser_watcher
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698