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

Side by Side Diff: skia/ext/vector_canvas_unittest.cc

Issue 819203002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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
« no previous file with comments | « rlz/test/rlz_unittest_main.cc ('k') | sync/tools/sync_client.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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if !defined(OS_WIN) 7 #if !defined(OS_WIN)
8 #include <unistd.h> 8 #include <unistd.h>
9 #endif 9 #endif
10 10
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 411
412 Image image1(*vcanvas_); 412 Image image1(*vcanvas_);
413 Image image2(*pcanvas_); 413 Image image2(*pcanvas_);
414 double diff = image1.PercentageDifferent(image2); 414 double diff = image1.PercentageDifferent(image2);
415 return std::max(std::max(diff1, diff2), diff); 415 return std::max(std::max(diff1, diff2), diff);
416 } 416 }
417 417
418 // Returns COMPARE, which is the default. If kGenerateSwitch command 418 // Returns COMPARE, which is the default. If kGenerateSwitch command
419 // line argument is used to start this process, GENERATE is returned instead. 419 // line argument is used to start this process, GENERATE is returned instead.
420 static ProcessAction CurrentMode() { 420 static ProcessAction CurrentMode() {
421 return CommandLine::ForCurrentProcess()->HasSwitch(kGenerateSwitch) ? 421 return base::CommandLine::ForCurrentProcess()->HasSwitch(kGenerateSwitch)
422 GENERATE : COMPARE; 422 ? GENERATE
423 : COMPARE;
423 } 424 }
424 425
425 // Length in x and y of the square canvas. 426 // Length in x and y of the square canvas.
426 int size_; 427 int size_;
427 428
428 // Current image number in the current test. Used to number of test files. 429 // Current image number in the current test. Used to number of test files.
429 int number_; 430 int number_;
430 431
431 // A temporary HDC to draw into. 432 // A temporary HDC to draw into.
432 Context* context_; 433 Context* context_;
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 pcanvas_->rotate(67); 961 pcanvas_->rotate(67);
961 vcanvas_->drawBitmap(bitmap, 20, -50, NULL); 962 vcanvas_->drawBitmap(bitmap, 20, -50, NULL);
962 pcanvas_->drawBitmap(bitmap, 20, -50, NULL); 963 pcanvas_->drawBitmap(bitmap, 20, -50, NULL);
963 EXPECT_EQ(0., ProcessImage(FILE_PATH_LITERAL("rotate"))); 964 EXPECT_EQ(0., ProcessImage(FILE_PATH_LITERAL("rotate")));
964 } 965 }
965 } 966 }
966 967
967 #endif // !defined(USE_AURA) 968 #endif // !defined(USE_AURA)
968 969
969 } // namespace skia 970 } // namespace skia
OLDNEW
« no previous file with comments | « rlz/test/rlz_unittest_main.cc ('k') | sync/tools/sync_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698