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

Side by Side Diff: chrome/test/chromedriver/session_commands.cc

Issue 101203012: [chromedriver] Add an error autoreporting feature that automatically raises errors from browser logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from review Created 6 years, 11 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) 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 "chrome/test/chromedriver/session_commands.h" 5 #include "chrome/test/chromedriver/session_commands.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 } 600 }
601 std::string error_msg; 601 std::string error_msg;
602 base::FilePath upload; 602 base::FilePath upload;
603 Status status = UnzipSoleFile(upload_dir, zip_data, &upload); 603 Status status = UnzipSoleFile(upload_dir, zip_data, &upload);
604 if (status.IsError()) 604 if (status.IsError())
605 return Status(kUnknownError, "unable to unzip 'file'", status); 605 return Status(kUnknownError, "unable to unzip 'file'", status);
606 606
607 value->reset(new base::StringValue(upload.value())); 607 value->reset(new base::StringValue(upload.value()));
608 return Status(kOk); 608 return Status(kOk);
609 } 609 }
610
611 Status ExecuteIsAutoReporting(
612 Session* session,
613 const base::DictionaryValue& params,
614 scoped_ptr<base::Value>* value) {
615 value->reset(new base::FundamentalValue(session->auto_reporting_enabled));
616 return Status(kOk);
617 }
618
619 Status ExecuteSetAutoReporting(
620 Session* session,
621 const base::DictionaryValue& params,
622 scoped_ptr<base::Value>* value) {
623 bool enabled;
624 if (!params.GetBoolean("enabled", &enabled))
625 return Status(kUnknownError, "missing parameter 'enabled'");
626 session->auto_reporting_enabled = enabled;
627 return Status(kOk);
628 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/session_commands.h ('k') | chrome/test/chromedriver/session_commands_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698