| OLD | NEW |
| 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/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 CommandLine::ForCurrentProcess()->GetSwitchValueNative( | 151 CommandLine::ForCurrentProcess()->GetSwitchValueNative( |
| 152 switches::kExtraChromeFlags); | 152 switches::kExtraChromeFlags); |
| 153 if (MatchPattern(flags, FILE_PATH_LITERAL("*.json:*"))) { | 153 if (MatchPattern(flags, FILE_PATH_LITERAL("*.json:*"))) { |
| 154 CommandLine::StringType::size_type colon_pos = flags.find_last_of(':'); | 154 CommandLine::StringType::size_type colon_pos = flags.find_last_of(':'); |
| 155 CommandLine::StringType::size_type num_pos = colon_pos + 1; | 155 CommandLine::StringType::size_type num_pos = colon_pos + 1; |
| 156 int index; | 156 int index; |
| 157 ASSERT_TRUE(base::StringToInt( | 157 ASSERT_TRUE(base::StringToInt( |
| 158 flags.substr(num_pos, flags.size() - num_pos), &index)); | 158 flags.substr(num_pos, flags.size() - num_pos), &index)); |
| 159 base::FilePath filepath(flags.substr(0, colon_pos)); | 159 base::FilePath filepath(flags.substr(0, colon_pos)); |
| 160 std::string json; | 160 std::string json; |
| 161 ASSERT_TRUE(file_util::ReadFileToString(filepath, &json)); | 161 ASSERT_TRUE(base::ReadFileToString(filepath, &json)); |
| 162 ASSERT_TRUE(ParseFlagsFromJSON(filepath.DirName(), json, index)); | 162 ASSERT_TRUE(ParseFlagsFromJSON(filepath.DirName(), json, index)); |
| 163 } else { | 163 } else { |
| 164 gurl_ = GURL(flags); | 164 gurl_ = GURL(flags); |
| 165 } | 165 } |
| 166 } | 166 } |
| 167 | 167 |
| 168 void AllowExternalDNS() { | 168 void AllowExternalDNS() { |
| 169 net::RuleBasedHostResolverProc* resolver = | 169 net::RuleBasedHostResolverProc* resolver = |
| 170 new net::RuleBasedHostResolverProc(host_resolver()); | 170 new net::RuleBasedHostResolverProc(host_resolver()); |
| 171 resolver->AllowDirectLookup("*"); | 171 resolver->AllowDirectLookup("*"); |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 | 601 |
| 602 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasManyImagesGPU) { | 602 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasManyImagesGPU) { |
| 603 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); | 603 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); |
| 604 } | 604 } |
| 605 | 605 |
| 606 IN_PROC_BROWSER_TEST_F(ThroughputTestThread, CanvasManyImagesGPU) { | 606 IN_PROC_BROWSER_TEST_F(ThroughputTestThread, CanvasManyImagesGPU) { |
| 607 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); | 607 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); |
| 608 } | 608 } |
| 609 | 609 |
| 610 } // namespace | 610 } // namespace |
| OLD | NEW |