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

Side by Side Diff: chrome/browser/nacl_host/test/nacl_gdb_browsertest.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
« no previous file with comments | « chrome/browser/nacl_host/nacl_browser.cc ('k') | chrome/browser/net/crl_set_fetcher.cc » ('j') | 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/environment.h" 6 #include "base/environment.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 if (base::win::OSInfo::GetInstance()->wow64_status() == 48 if (base::win::OSInfo::GetInstance()->wow64_status() ==
49 base::win::OSInfo::WOW64_DISABLED) { 49 base::win::OSInfo::WOW64_DISABLED) {
50 return; 50 return;
51 } 51 }
52 #endif 52 #endif
53 EXPECT_TRUE(file_util::CreateTemporaryFile(&mock_nacl_gdb_file)); 53 EXPECT_TRUE(file_util::CreateTemporaryFile(&mock_nacl_gdb_file));
54 env->SetVar("MOCK_NACL_GDB", mock_nacl_gdb_file.AsUTF8Unsafe()); 54 env->SetVar("MOCK_NACL_GDB", mock_nacl_gdb_file.AsUTF8Unsafe());
55 RunTestViaHTTP(test_name); 55 RunTestViaHTTP(test_name);
56 env->UnSetVar("MOCK_NACL_GDB"); 56 env->UnSetVar("MOCK_NACL_GDB");
57 57
58 EXPECT_TRUE(file_util::ReadFileToString(mock_nacl_gdb_file, &content)); 58 EXPECT_TRUE(base::ReadFileToString(mock_nacl_gdb_file, &content));
59 EXPECT_STREQ("PASS", content.c_str()); 59 EXPECT_STREQ("PASS", content.c_str());
60 EXPECT_TRUE(base::DeleteFile(mock_nacl_gdb_file, false)); 60 EXPECT_TRUE(base::DeleteFile(mock_nacl_gdb_file, false));
61 61
62 content.clear(); 62 content.clear();
63 EXPECT_TRUE(file_util::ReadFileToString(script_, &content)); 63 EXPECT_TRUE(base::ReadFileToString(script_, &content));
64 EXPECT_STREQ("PASS", content.c_str()); 64 EXPECT_STREQ("PASS", content.c_str());
65 EXPECT_TRUE(base::DeleteFile(script_, false)); 65 EXPECT_TRUE(base::DeleteFile(script_, false));
66 } 66 }
67 67
68 private: 68 private:
69 base::FilePath script_; 69 base::FilePath script_;
70 }; 70 };
71 71
72 // Fails on the ASAN test bot. See http://crbug.com/122219 72 // Fails on the ASAN test bot. See http://crbug.com/122219
73 #if defined(ADDRESS_SANITIZER) 73 #if defined(ADDRESS_SANITIZER)
74 #define MAYBE_Empty DISABLED_Empty 74 #define MAYBE_Empty DISABLED_Empty
75 #else 75 #else
76 #define MAYBE_Empty Empty 76 #define MAYBE_Empty Empty
77 #endif 77 #endif
78 IN_PROC_BROWSER_TEST_F(NaClGdbTest, MAYBE_Empty) { 78 IN_PROC_BROWSER_TEST_F(NaClGdbTest, MAYBE_Empty) {
79 RunWithNaClGdb("Empty"); 79 RunWithNaClGdb("Empty");
80 } 80 }
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_browser.cc ('k') | chrome/browser/net/crl_set_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698