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

Side by Side Diff: win8/test/ui_automation_client.cc

Issue 768513003: Fixed return value in error path -- result instead of false. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « no previous file | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "win8/test/ui_automation_client.h" 5 #include "win8/test/ui_automation_client.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlcom.h> 8 #include <atlcom.h>
9 #include <oleauto.h> 9 #include <oleauto.h>
10 #include <uiautomation.h> 10 #include <uiautomation.h>
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 370
371 // Search for an invokable element named item_name. 371 // Search for an invokable element named item_name.
372 var.Set(true); 372 var.Set(true);
373 result = automation_->CreatePropertyCondition( 373 result = automation_->CreatePropertyCondition(
374 UIA_IsInvokePatternAvailablePropertyId, 374 UIA_IsInvokePatternAvailablePropertyId,
375 var, 375 var,
376 invokable_condition.Receive()); 376 invokable_condition.Receive());
377 var.Reset(); 377 var.Reset();
378 if (FAILED(result)) { 378 if (FAILED(result)) {
379 LOG(ERROR) << std::hex << result; 379 LOG(ERROR) << std::hex << result;
380 return false; 380 return result;
381 } 381 }
382 382
383 var.Set(item_name_.c_str()); 383 var.Set(item_name_.c_str());
384 result = automation_->CreatePropertyCondition(UIA_NamePropertyId, 384 result = automation_->CreatePropertyCondition(UIA_NamePropertyId,
385 var, 385 var,
386 item_name_condition.Receive()); 386 item_name_condition.Receive());
387 var.Reset(); 387 var.Reset();
388 if (FAILED(result)) { 388 if (FAILED(result)) {
389 LOG(ERROR) << std::hex << result; 389 LOG(ERROR) << std::hex << result;
390 return result; 390 return result;
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 context_, 611 context_,
612 base::ThreadTaskRunnerHandle::Get(), 612 base::ThreadTaskRunnerHandle::Get(),
613 base::string16(class_name), 613 base::string16(class_name),
614 item_name, 614 item_name,
615 init_callback, 615 init_callback,
616 result_callback)); 616 result_callback));
617 } 617 }
618 618
619 } // namespace internal 619 } // namespace internal
620 } // namespace win8 620 } // namespace win8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698