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

Side by Side Diff: ppapi/tests/test_network_monitor_private.cc

Issue 10823187: NaCl proxy for PPB_NetworkMonitor_Private (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « ppapi/ppapi_sources.gypi ('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
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 "ppapi/tests/test_network_monitor_private.h" 5 #include "ppapi/tests/test_network_monitor_private.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "ppapi/cpp/instance_handle.h" 9 #include "ppapi/cpp/instance_handle.h"
10 #include "ppapi/cpp/module.h" 10 #include "ppapi/cpp/module.h"
(...skipping 30 matching lines...) Expand all
41 41
42 data->network_list = pp::NetworkListPrivate(pp::PASS_REF, pp_network_list); 42 data->network_list = pp::NetworkListPrivate(pp::PASS_REF, pp_network_list);
43 43
44 if (data->delete_monitor) 44 if (data->delete_monitor)
45 delete data->monitor; 45 delete data->monitor;
46 46
47 if (data->call_counter == 1) 47 if (data->call_counter == 1)
48 data->event.Signal(); 48 data->event.Signal();
49 } 49 }
50 50
51
52 class TestNetworkListObserver : public pp::NetworkListObserverPrivate { 51 class TestNetworkListObserver : public pp::NetworkListObserverPrivate {
53 public: 52 public:
54 explicit TestNetworkListObserver(const pp::InstanceHandle& instance) 53 explicit TestNetworkListObserver(const pp::InstanceHandle& instance)
55 : pp::NetworkListObserverPrivate(instance), 54 : pp::NetworkListObserverPrivate(instance),
56 event(instance.pp_instance()) { 55 event(instance.pp_instance()) {
57 } 56 }
58 virtual void OnNetworkListChanged(const pp::NetworkListPrivate& list) { 57 virtual void OnNetworkListChanged(const pp::NetworkListPrivate& list) {
59 current_list = list; 58 current_list = list;
60 event.Signal(); 59 event.Signal();
61 } 60 }
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 212
214 PASS(); 213 PASS();
215 } 214 }
216 215
217 std::string TestNetworkMonitorPrivate::TestListObserver() { 216 std::string TestNetworkMonitorPrivate::TestListObserver() {
218 TestNetworkListObserver observer(instance_); 217 TestNetworkListObserver observer(instance_);
219 observer.event.Wait(); 218 observer.event.Wait();
220 ASSERT_SUBTEST_SUCCESS(VerifyNetworkList(observer.current_list)); 219 ASSERT_SUBTEST_SUCCESS(VerifyNetworkList(observer.current_list));
221 PASS(); 220 PASS();
222 } 221 }
OLDNEW
« no previous file with comments | « ppapi/ppapi_sources.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698