/third_party/node/test/parallel/ |
H A D | test-http-agent-scheduling.js | 14 function makeRequest(url, agent, callback) { 16 .request(url, { agent }, (res) => { 29 function bulkRequest(url, agent, done) { 31 let count = agent.maxSockets; 33 for (let i = 0; i < agent.maxSockets; i++) { 34 makeRequest(url, agent, callback); 52 const agent = new http.Agent({ 57 bulkRequest(url, agent, (ports) => { 58 makeRequest(url, agent, (port) => { 60 makeRequest(url, agent, (por [all...] |
H A D | test-http-agent-keepalive.js | 30 const agent = new Agent({ 53 agent: agent, 60 assert.strictEqual(agent.sockets[name].length, 1); 61 assert.strictEqual(agent.freeSockets[name], undefined); 62 assert.strictEqual(agent.totalSocketCount, 1); 72 assert.strictEqual(agent.sockets[name].length, 1); 73 assert.strictEqual(agent.freeSockets[name], undefined); 75 assert.strictEqual(agent.sockets[name], undefined); 76 assert.strictEqual(agent [all...] |
H A D | test-http-keep-alive.js | 35 const agent = new http.Agent({ maxSockets: 1 }); 40 name = agent.getName({ port: this.address().port }); 42 path: '/', headers: headers, port: this.address().port, agent: agent 44 assert.strictEqual(agent.sockets[name].length, 1); 45 assert.strictEqual(agent.requests[name].length, 2); 50 path: '/', headers: headers, port: this.address().port, agent: agent 52 assert.strictEqual(agent.sockets[name].length, 1); 53 assert.strictEqual(agent [all...] |
H A D | test-http-keep-alive-close-on-header.js | 40 const agent = new http.Agent({ maxSockets: 1 }); 41 const name = agent.getName({ port: this.address().port }); 47 agent: agent 49 assert.strictEqual(agent.sockets[name].length, 1); 64 agent: agent 66 assert.strictEqual(agent.sockets[name].length, 1); 80 agent: agent [all...] |
H A D | test-http-addrequest-localaddress.js | 9 const agent = require('http').globalAgent; 16 agent.maxSockets = 0; 20 agent.addRequest(req, 'localhost', 8080, '127.0.0.1'); 21 assert.strictEqual(Object.keys(agent.requests).length, 1); 23 Object.keys(agent.requests)[0], 28 agent.addRequest(req, { 34 assert.strictEqual(Object.keys(agent.requests).length, 1); 36 Object.keys(agent.requests)[0],
|
H A D | test-http-client-reject-unexpected-agent.js | 14 'agent', 34 function createRequest(agent) { 35 const options = Object.assign(baseOptions, { agent }); 49 failingAgentOptions.forEach((agent) => { 51 () => createRequest(agent), 55 message: 'The "options.agent" property must be one of Agent-like ' + 57 common.invalidArgTypeHelper(agent) 62 acceptableAgentOptions.forEach((agent) => { 63 createRequest(agent);
|
H A D | test-https-agent-create-connection.js | 11 const agent = new https.Agent(); 54 _agentKey: agent.getName({ port, host }) 57 const socket = agent.createConnection(options); 70 _agentKey: agent.getName({ port, host }) 72 const socket = agent.createConnection(port, options); 85 _agentKey: agent.getName({ port, host }) 87 const socket = agent.createConnection(port, host, options); 101 const socket = agent.createConnection(port, host, options); 113 const socket = agent.createConnection(port, host, options); 128 const socket = agent [all...] |
H A D | test-http-agent-maxtotalsockets.js | 33 const agent = new http.Agent({ 53 agent.destroy(); 63 agent, 69 for (const key of Object.keys(agent.sockets)) { 70 assert(agent.sockets[key].length <= maxSockets); 81 for (const key of Object.keys(agent.sockets)) { 82 num += agent.sockets[key].length; 89 for (const key of Object.keys(agent.requests)) { 90 num += agent.requests[key].length;
|
H A D | test-http-agent-maxsockets.js | 7 const agent = new http.Agent({ 24 agent: agent, 30 const freepool = agent.freeSockets[Object.keys(agent.freeSockets)[0]]; 33 agent.destroy();
|
H A D | test-https-agent-abort-controller.js | 13 const agent = new Agent(); 29 _agentKey: agent.getName({ port, host }) 35 const connection = agent.createConnection({ ...options, signal }); 46 const connection = agent.createConnection({ ...options, signal }); 58 agent: agent, 74 agent: agent,
|
H A D | test-http-agent-maxsockets-respected.js | 13 const agent = new http.Agent({ 33 agent: agent, 49 const sockets = agent.sockets[Object.keys(agent.sockets)[0]];
|
H A D | test-https-agent-sockets-leak.js | 22 const agent = new https.Agent({ 33 agent: agent 38 // Only one entry should exist in agent.sockets pool 39 // If there are more entries in agent.sockets, 41 assert.strictEqual(Object.keys(agent.sockets).length, 1); 45 // exist in agent.sockets pool after both request and socket 47 assert.strictEqual(Object.keys(agent.sockets).length, 0);
|
H A D | test-https-agent-sni.js | 39 const agent = new https.Agent({ 44 agent: agent, 54 agent: agent,
|
/foundation/window/window_manager/window_scene/session_manager/src/ |
H A D | session_manager_agent_controller.cpp | 83 for (auto& agent : smAgentContainer_.GetAgentsByType( in UpdateCameraFloatWindowStatus() 85 if (agent != nullptr) { in UpdateCameraFloatWindowStatus() 86 agent->UpdateCameraFloatWindowStatus(accessTokenId, isShowing); in UpdateCameraFloatWindowStatus() 93 for (auto& agent : smAgentContainer_.GetAgentsByType( in UpdateFocusChangeInfo() 95 if (agent != nullptr) { in UpdateFocusChangeInfo() 96 agent->UpdateFocusChangeInfo(focusChangeInfo, isFocused); in UpdateFocusChangeInfo() 105 for (auto& agent : smAgentContainer_.GetAgentsByType( in UpdateWindowModeTypeInfo() 107 if (agent != nullptr) { in UpdateWindowModeTypeInfo() 108 agent->UpdateWindowModeTypeInfo(type); in UpdateWindowModeTypeInfo() 116 for (auto& agent in NotifyAccessibilityWindowInfo() [all...] |
/foundation/window/window_manager/dmserver/src/ |
H A D | display_manager_agent_controller.cpp | 47 for (auto& agent : agents) {
in NotifyDisplayPowerEvent() 48 agent->NotifyDisplayPowerEvent(event, status);
in NotifyDisplayPowerEvent() 60 for (auto& agent : agents) {
in NotifyDisplayStateChanged() 61 agent->NotifyDisplayStateChanged(id, state);
in NotifyDisplayStateChanged() 76 for (auto& agent : agents) {
in OnScreenConnect() 77 agent->OnScreenConnect(screenInfo);
in OnScreenConnect() 88 for (auto& agent : agents) {
in OnScreenDisconnect() 89 agent->OnScreenDisconnect(screenId);
in OnScreenDisconnect() 103 for (auto& agent : agents) {
in OnScreenChange() 104 agent in OnScreenChange() [all...] |
/foundation/window/window_manager/wmserver/src/ |
H A D | window_manager_agent_controller.cpp | 41 for (auto& agent : wmAgentContainer_.GetAgentsByType(WindowManagerAgentType::WINDOW_MANAGER_AGENT_TYPE_FOCUS)) {
in UpdateFocusChangeInfo() 42 agent->UpdateFocusChangeInfo(focusChangeInfo, focused);
in UpdateFocusChangeInfo() 48 for (auto& agent : wmAgentContainer_.GetAgentsByType(
in UpdateWindowModeTypeInfo() 50 agent->UpdateWindowModeTypeInfo(type);
in UpdateWindowModeTypeInfo() 60 for (auto& agent : wmAgentContainer_.GetAgentsByType(
in UpdateSystemBarRegionTints() 62 agent->UpdateSystemBarRegionTints(displayId, tints);
in UpdateSystemBarRegionTints() 70 for (auto& agent : wmAgentContainer_.GetAgentsByType(
in NotifyAccessibilityWindowInfo() 72 agent->NotifyAccessibilityWindowInfo(infos, type);
in NotifyAccessibilityWindowInfo() 80 for (auto& agent : wmAgentContainer_.GetAgentsByType(
in UpdateWindowVisibilityInfo() 82 agent in UpdateWindowVisibilityInfo() [all...] |
/foundation/filemanagement/dfs_service/services/distributedfiledaemon/test/unittest/network/softbus/ |
H A D | softbus_agent_test.cpp | 110 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); in HWTEST_F() local 111 EXPECT_EQ(agent->sessionName_, "DistributedFileService/mnt/hmdfs/100/account"); in HWTEST_F() 131 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); in HWTEST_F() local 132 bool flag = agent->IsSameAccount(NETWORKID_ONE); in HWTEST_F() 134 flag = agent->IsSameAccount(NETWORKID_TWO); in HWTEST_F() 136 flag = agent->IsSameAccount(NETWORKID_THREE); in HWTEST_F() 139 flag = agent->IsSameAccount(NETWORKID_ONE); in HWTEST_F() 157 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); in HWTEST_F() local 160 agent->QuitDomain(); in HWTEST_F() 181 std::shared_ptr<SoftbusAgent> agent in HWTEST_F() local 209 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local 244 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local 270 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local 294 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local 318 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local 344 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local 371 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local 398 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local 423 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local 447 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local 478 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local 509 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local 536 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local 560 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local 591 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local 614 std::shared_ptr<SoftbusAgent> agent = std::make_shared<SoftbusAgent>(wmp); HWTEST_F() local [all...] |
/foundation/window/window_manager/utils/include/ |
H A D | client_agent_container.h | 35 bool RegisterAgent(const sptr<T1>& agent, T2 type);
36 bool UnregisterAgent(const sptr<T1>& agent, T2 type);
39 int32_t GetAgentPid(const sptr<T1>& agent);
43 bool UnregisterAgentLocked(std::set<sptr<T1>>& agents, const sptr<IRemoteObject>& agent);
50 bool operator()(sptr<T1> agent)
in operator ()() 52 if (agent == nullptr) {
in operator ()() 53 WLOGFE("agent is invalid");
in operator ()() 56 return agent->AsObject() == remoteObject_;
in operator ()() 74 bool ClientAgentContainer<T1, T2>::RegisterAgent(const sptr<T1>& agent, T2 type)
in RegisterAgent() argument 77 if (agent in RegisterAgent() 90 UnregisterAgent(const sptr<T1>& agent, T2 type) UnregisterAgent() argument 119 UnregisterAgentLocked(std::set<sptr<T1>>& agents, const sptr<IRemoteObject>& agent) UnregisterAgentLocked() argument 175 GetAgentPid(const sptr<T1>& agent) GetAgentPid() argument [all...] |
/foundation/ability/ability_runtime/interfaces/inner_api/wantagent/src/ |
H A D | want_agent_helper.cpp | 177 std::shared_ptr<WantAgent> agent = std::make_shared<WantAgent>(std::make_shared<PendingWant>(target)); in GetWantAgent() local 179 return agent; in GetWantAgent() 182 WantAgentConstant::OperationType WantAgentHelper::GetType(std::shared_ptr<WantAgent> agent) in GetType() argument 184 if ((agent == nullptr) || (agent->GetPendingWant() == nullptr)) { in GetType() 188 return agent->GetPendingWant()->GetType(agent->GetPendingWant()->GetTarget()); in GetType() 191 ErrCode WantAgentHelper::TriggerWantAgent(std::shared_ptr<WantAgent> agent, in TriggerWantAgent() argument 195 if (agent == nullptr) { in TriggerWantAgent() 199 std::shared_ptr<PendingWant> pendingWant = agent in TriggerWantAgent() 226 Cancel(const std::shared_ptr<WantAgent> agent) Cancel() argument 242 IsEquals( const std::shared_ptr<WantAgent> &agent, const std::shared_ptr<WantAgent> &otherAgent) IsEquals() argument 255 GetBundleName(const std::shared_ptr<WantAgent> &agent, std::string &bundleName) GetBundleName() argument 272 GetUid(const std::shared_ptr<WantAgent> &agent, int32_t &uid) GetUid() argument 288 GetWant(const std::shared_ptr<WantAgent> &agent) GetWant() argument 305 RegisterCancelListener( const std::shared_ptr<CancelListener> &cancelListener, const std::shared_ptr<WantAgent> &agent) RegisterCancelListener() argument 322 UnregisterCancelListener( const std::shared_ptr<CancelListener> &cancelListener, const std::shared_ptr<WantAgent> &agent) UnregisterCancelListener() argument 339 ToString(const std::shared_ptr<WantAgent> &agent) ToString() argument 457 GetType(const std::shared_ptr<WantAgent> &agent, int32_t &operType) GetType() argument 467 GetWant(const std::shared_ptr<WantAgent> &agent, std::shared_ptr<AAFwk::Want> &want) GetWant() argument [all...] |
/foundation/window/window_manager/test/fuzztest/wms/windowagent_fuzzer/ |
H A D | window_agent_fuzzer.cpp | 46 void CheckWindowAgentFunctionsPart1(sptr<WindowAgent> agent, const uint8_t* data, size_t size) in CheckWindowAgentFunctionsPart1() argument 48 if (agent == nullptr || data == nullptr || size < DATA_MIN_SIZE) { in CheckWindowAgentFunctionsPart1() 58 agent->UpdateWindowRect(rect, boolVal, reason); in CheckWindowAgentFunctionsPart1() 62 agent->UpdateWindowMode(mode); in CheckWindowAgentFunctionsPart1() 66 agent->UpdateWindowModeSupportInfo(modeSupportInfo); in CheckWindowAgentFunctionsPart1() 67 agent->UpdateFocusStatus(boolVal); in CheckWindowAgentFunctionsPart1() 68 agent->NotifyForegroundInteractiveStatus(boolVal); in CheckWindowAgentFunctionsPart1() 81 agent->UpdateAvoidArea(avoidArea, type); in CheckWindowAgentFunctionsPart1() 85 agent->UpdateWindowState(state); in CheckWindowAgentFunctionsPart1() 88 void CheckWindowAgentFunctionsPart2(sptr<WindowAgent> agent, cons argument [all...] |
/third_party/python/Lib/test/ |
H A D | test_robotparser.py | 14 agent = 'test_robotparser' variable in BaseRobotTest 26 agent, url = url 27 return agent, url 28 return self.agent, url 32 agent, url = self.get_agent_and_url(url) 33 with self.subTest(url=url, agent=agent): 34 self.assertTrue(self.parser.can_fetch(agent, url)) 38 agent, url = self.get_agent_and_url(url) 39 with self.subTest(url=url, agent 144 agent = 'figtree' global() variable in CrawlDelayAndRequestRateTest 153 agent = 'FigTree Robot libwww-perl/5.04' global() variable in DifferentAgentTest 192 agent = 'Googlebot' global() variable in AnotherInvalidRequestRateTest 208 agent = 'Googlebot' global() variable in UserAgentOrderingTest 213 agent = 'Googlebot-Mobile' global() variable in UserAgentGoogleMobileTest 224 agent = 'googlebot' global() variable in GoogleURLOrderingTest [all...] |
/foundation/ability/ability_runtime/interfaces/inner_api/wantagent/include/ |
H A D | want_agent_helper.h | 79 * @param agent Indicates the WantAgent to trigger. 82 static WantAgentConstant::OperationType GetType(std::shared_ptr<WantAgent> agent); 83 static ErrCode GetType(const std::shared_ptr<WantAgent> &agent, int32_t &operType); 92 * @param agent Indicates the WantAgent to trigger. 100 static ErrCode TriggerWantAgent(std::shared_ptr<WantAgent> agent, 109 * @param agent Indicates the WantAgent to cancel. 111 static ErrCode Cancel(const std::shared_ptr<WantAgent> agent); 116 * @param agent Indicates one of the WantAgent object to compare. 120 static ErrCode IsEquals(const std::shared_ptr<WantAgent> &agent, const std::shared_ptr<WantAgent> &otherAgent); 123 * @brief Get bundle name by want agent [all...] |
/foundation/filemanagement/dfs_service/services/distributedfiledaemon/src/network/softbus/ |
H A D | softbus_session_dispatcher.cpp | 42 auto agent = busNameToAgent_.find(busName); in RegisterSessionListener() local 43 if (agent != busNameToAgent_.end()) { in RegisterSessionListener() 56 auto agent = busNameToAgent_.find(busName); in UnregisterSessionListener() local 57 if (agent != busNameToAgent_.end()) { in UnregisterSessionListener() 73 auto agent = busNameToAgent_.find(string(peerSessionName)); in GetAgent() local 74 if (agent != busNameToAgent_.end()) { in GetAgent() 76 return agent->second; in GetAgent() 90 auto agent = GetAgent(sessionId, peerSessionName); in OnSessionOpened() local 91 if (auto spt = agent.lock()) { in OnSessionOpened() 114 auto agent in OnSessionClosed() local [all...] |
/foundation/CastEngine/castengine_wifi_display/services/context/ |
H A D | context.cpp | 17 #include "agent/sinkagent/sink_agent.h" 18 #include "agent/srcagent/src_agent.h" 94 SHARING_LOGI("contextId: %{public}u, destroy agent agentId: %{public}u.", GetId(), eventMsg->agentId); in HandleAgentDestroy() 96 auto agent = GetAgentById(eventMsg->agentId); in HandleAgentDestroy() local 97 if (agent == nullptr) { in HandleAgentDestroy() 98 SHARING_LOGE("agent null agentId: %{public}d.", eventMsg->agentId); in HandleAgentDestroy() 102 if (agent->GetAgentType() == SRC_AGENT) { in HandleAgentDestroy() 104 agent->HandleEvent(event); in HandleAgentDestroy() 106 agent->SetDestroy(); in HandleAgentDestroy() 109 agent in HandleAgentDestroy() 129 auto agent = GetAgentById(eventMsg->agentId); DistributeEvent() local 245 std::shared_ptr<Agent> agent = nullptr; HandleCreateAgent() local 332 auto agent = GetAgentById(eventMsg->agentId); HandleStateDestroyAgent() local 355 auto agent = GetAgentById(sinkAgentId); CheckNeedDestroySink() local [all...] |
/third_party/node/lib/ |
H A D | _http_client.js | 157 let agent = options.agent; 159 if (agent === false) { 160 agent = new defaultAgent.constructor(); 161 } else if (agent === null || agent === undefined) { 163 agent = defaultAgent; 165 // Explicitly pass through this statement as agent will not be used 167 } else if (typeof agent.addRequest !== 'function') { 168 throw new ERR_INVALID_ARG_TYPE('options.agent', [all...] |