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

Side by Side Diff: chrome/test/gpu/gpu_pixel_browsertest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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/test/chromedriver/window_commands.cc ('k') | chrome/test/perf/dom_checker_uitest.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/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/path_service.h" 8 #include "base/path_service.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 ref_img_dir_ = test_data_dir_.AppendASCII("llvmpipe_reference"); 138 ref_img_dir_ = test_data_dir_.AppendASCII("llvmpipe_reference");
139 break; 139 break;
140 default: 140 default:
141 break; 141 break;
142 } 142 }
143 143
144 test_name_ = testing::UnitTest::GetInstance()->current_test_info()->name(); 144 test_name_ = testing::UnitTest::GetInstance()->current_test_info()->name();
145 const char* test_status_prefixes[] = {"DISABLED_", "FLAKY_", "FAILS_"}; 145 const char* test_status_prefixes[] = {"DISABLED_", "FLAKY_", "FAILS_"};
146 for (size_t i = 0; i < arraysize(test_status_prefixes); ++i) { 146 for (size_t i = 0; i < arraysize(test_status_prefixes); ++i) {
147 ReplaceFirstSubstringAfterOffset( 147 ReplaceFirstSubstringAfterOffset(
148 &test_name_, 0, test_status_prefixes[i], ""); 148 &test_name_, 0, test_status_prefixes[i], std::string());
149 } 149 }
150 150
151 ui::DisableTestCompositor(); 151 ui::DisableTestCompositor();
152 } 152 }
153 153
154 // If the existing ref image was saved from an revision older than the 154 // If the existing ref image was saved from an revision older than the
155 // ref_img_update_revision, refresh the ref image. 155 // ref_img_update_revision, refresh the ref image.
156 void RunPixelTest(const gfx::Size& tab_container_size, 156 void RunPixelTest(const gfx::Size& tab_container_size,
157 const base::FilePath& url, 157 const base::FilePath& url,
158 int64 ref_img_update_revision, 158 int64 ref_img_update_revision,
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 {160, 100, 0, 0, 0} 540 {160, 100, 0, 0, 0}
541 }; 541 };
542 const size_t ref_pixel_count = sizeof(ref_pixels) / sizeof(ReferencePixel); 542 const size_t ref_pixel_count = sizeof(ref_pixels) / sizeof(ReferencePixel);
543 543
544 gfx::Size container_size(400, 300); 544 gfx::Size container_size(400, 300);
545 base::FilePath url = 545 base::FilePath url =
546 test_data_dir().AppendASCII("pixel_canvas2d.html"); 546 test_data_dir().AppendASCII("pixel_canvas2d.html");
547 RunPixelTest(container_size, url, ref_img_revision_update, 547 RunPixelTest(container_size, url, ref_img_revision_update,
548 ref_pixels, ref_pixel_count); 548 ref_pixels, ref_pixel_count);
549 } 549 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/window_commands.cc ('k') | chrome/test/perf/dom_checker_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698