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

Side by Side Diff: webrtc/base/winfirewall_unittest.cc

Issue 2365363003: Delete winfirewall.h. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « webrtc/base/winfirewall.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2010 The WebRTC Project Authors. All rights reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #include "webrtc/base/gunit.h"
12 #include "webrtc/base/winfirewall.h"
13
14 #include <objbase.h>
15
16 namespace rtc {
17
18 TEST(WinFirewallTest, ReadStatus) {
19 ::CoInitialize(NULL);
20 WinFirewall fw;
21 HRESULT hr;
22 bool authorized;
23
24 EXPECT_FALSE(fw.QueryAuthorized("bogus.exe", &authorized));
25 EXPECT_TRUE(fw.Initialize(&hr));
26 EXPECT_EQ(S_OK, hr);
27
28 EXPECT_TRUE(fw.QueryAuthorized("bogus.exe", &authorized));
29
30 // Unless we mock out INetFwMgr we can't really have an expectation either way
31 // about whether we're authorized. It will depend on the settings of the
32 // machine running the test. Same goes for AddApplication.
33
34 fw.Shutdown();
35 EXPECT_FALSE(fw.QueryAuthorized("bogus.exe", &authorized));
36
37 ::CoUninitialize();
38 }
39
40 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/winfirewall.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698