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

Side by Side Diff: chrome/test/reliability/automated_ui_tests.cc

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
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 <fstream> 5 #include <fstream>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 if (result != AUTOMATION_MSG_NAVIGATION_SUCCESS) { 620 if (result != AUTOMATION_MSG_NAVIGATION_SUCCESS) {
621 AddErrorAttribute("navigation_failed"); 621 AddErrorAttribute("navigation_failed");
622 return false; 622 return false;
623 } 623 }
624 return true; 624 return true;
625 } 625 }
626 626
627 bool AutomatedUITest::InitXMLReader() { 627 bool AutomatedUITest::InitXMLReader() {
628 base::FilePath input_path = GetInputFilePath(); 628 base::FilePath input_path = GetInputFilePath();
629 629
630 if (!file_util::ReadFileToString(input_path, &xml_init_file_)) 630 if (!base::ReadFileToString(input_path, &xml_init_file_))
631 return false; 631 return false;
632 return init_reader_.Load(xml_init_file_); 632 return init_reader_.Load(xml_init_file_);
633 } 633 }
634 634
635 bool AutomatedUITest::WriteReportToFile() { 635 bool AutomatedUITest::WriteReportToFile() {
636 base::FilePath path = GetOutputFilePath(); 636 base::FilePath path = GetOutputFilePath();
637 std::ofstream error_file; 637 std::ofstream error_file;
638 if (!path.empty()) 638 if (!path.empty())
639 error_file.open(path.value().c_str(), std::ios::out); 639 error_file.open(path.value().c_str(), std::ios::out);
640 640
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 } 756 }
757 } 757 }
758 758
759 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { 759 TEST_F(AutomatedUITest, TheOneAndOnlyTest) {
760 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 760 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
761 if (parsed_command_line.HasSwitch(kReproSwitch)) 761 if (parsed_command_line.HasSwitch(kReproSwitch))
762 RunReproduction(); 762 RunReproduction();
763 else 763 else
764 RunAutomatedUITest(); 764 RunAutomatedUITest();
765 } 765 }
OLDNEW
« no previous file with comments | « chrome/test/perf/tab_switching_test.cc ('k') | chrome/test/webdriver/webdriver_capabilities_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698