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

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

Issue 10080006: Make default location of checked in images match the checked in images. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 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 | « no previous file | no next file » | 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_path.h" 6 #include "base/file_path.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/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_)); 106 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_));
107 test_data_dir_ = test_data_dir_.AppendASCII("gpu"); 107 test_data_dir_ = test_data_dir_.AppendASCII("gpu");
108 108
109 CommandLine* command_line = CommandLine::ForCurrentProcess(); 109 CommandLine* command_line = CommandLine::ForCurrentProcess();
110 if (command_line->HasSwitch(kGeneratedDir)) 110 if (command_line->HasSwitch(kGeneratedDir))
111 generated_img_dir_ = command_line->GetSwitchValuePath(kGeneratedDir); 111 generated_img_dir_ = command_line->GetSwitchValuePath(kGeneratedDir);
112 else 112 else
113 generated_img_dir_ = test_data_dir_.AppendASCII("generated"); 113 generated_img_dir_ = test_data_dir_.AppendASCII("generated");
114 if (command_line->HasSwitch(kReferenceDir)) 114 if (command_line->HasSwitch(kReferenceDir))
115 ref_img_dir_ = command_line->GetSwitchValuePath(kReferenceDir); 115 ref_img_dir_ = command_line->GetSwitchValuePath(kReferenceDir);
116 else if (!command_line->HasSwitch(switches::kUseGpuInTests))
117 ref_img_dir_ = test_data_dir_.AppendASCII("llvmpipe_reference");
116 else 118 else
117 ref_img_dir_ = test_data_dir_.AppendASCII("gpu_reference"); 119 ref_img_dir_ = test_data_dir_.AppendASCII("gpu_reference");
118 120
119 // Only use checked in ref images when using a software rasterizer as 121 // Only use checked in ref images when using a software rasterizer as
120 // all machines should generate the same output with a software rasterizer. 122 // all machines should generate the same output with a software rasterizer.
121 use_checked_in_ref_imgs_ = !command_line->HasSwitch( 123 use_checked_in_ref_imgs_ = !command_line->HasSwitch(
122 switches::kUseGpuInTests); 124 switches::kUseGpuInTests);
123 125
124 test_name_ = testing::UnitTest::GetInstance()->current_test_info()->name(); 126 test_name_ = testing::UnitTest::GetInstance()->current_test_info()->name();
125 const char* test_status_prefixes[] = {"DISABLED_", "FLAKY_", "FAILS_"}; 127 const char* test_status_prefixes[] = {"DISABLED_", "FLAKY_", "FAILS_"};
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 IN_PROC_BROWSER_TEST_F(Canvas2DPixelTestSD, Canvas2DRedBoxSD) { 491 IN_PROC_BROWSER_TEST_F(Canvas2DPixelTestSD, Canvas2DRedBoxSD) {
490 // If test baseline needs to be updated after a given revision, update the 492 // If test baseline needs to be updated after a given revision, update the
491 // following number. If no revision requirement, then 0. 493 // following number. If no revision requirement, then 0.
492 const int64 ref_img_revision_update = 123489; 494 const int64 ref_img_revision_update = 123489;
493 495
494 gfx::Size container_size(400, 300); 496 gfx::Size container_size(400, 300);
495 FilePath url = 497 FilePath url =
496 test_data_dir().AppendASCII("pixel_canvas2d.html"); 498 test_data_dir().AppendASCII("pixel_canvas2d.html");
497 RunPixelTest(container_size, url, ref_img_revision_update); 499 RunPixelTest(container_size, url, ref_img_revision_update);
498 } 500 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698