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

Side by Side Diff: chrome/browser/chromeos/login/screenshot_testing/screenshot_testing_mixin.h

Issue 856493004: Update {virtual,override,final} to follow C++11 style in chrome/browser/chromeos/login. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENSHOT_TESTING_SCREENSHOT_TESTING_MIXI N_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENSHOT_TESTING_SCREENSHOT_TESTING_MIXI N_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENSHOT_TESTING_SCREENSHOT_TESTING_MIXI N_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENSHOT_TESTING_SCREENSHOT_TESTING_MIXI N_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/timer/timer.h" 11 #include "base/timer/timer.h"
12 #include "chrome/browser/chromeos/login/mixin_based_browser_test.h" 12 #include "chrome/browser/chromeos/login/mixin_based_browser_test.h"
13 #include "chrome/browser/chromeos/login/screenshot_testing/screenshot_tester.h" 13 #include "chrome/browser/chromeos/login/screenshot_testing/screenshot_tester.h"
14 #include "content/public/test/browser_test_base.h" 14 #include "content/public/test/browser_test_base.h"
15 15
16 namespace chromeos { 16 namespace chromeos {
17 17
18 // Base mixin class for tests which support testing with screenshots. 18 // Base mixin class for tests which support testing with screenshots.
19 // Sets up everything required for taking screenshots. 19 // Sets up everything required for taking screenshots.
20 // Provides functionality to deal with animation load: screenshots 20 // Provides functionality to deal with animation load: screenshots
21 // should be taken only when all the animation is loaded. 21 // should be taken only when all the animation is loaded.
22 class ScreenshotTestingMixin : public MixinBasedBrowserTest::Mixin { 22 class ScreenshotTestingMixin : public MixinBasedBrowserTest::Mixin {
23 public: 23 public:
24 ScreenshotTestingMixin(); 24 ScreenshotTestingMixin();
25 virtual ~ScreenshotTestingMixin(); 25 ~ScreenshotTestingMixin() override;
26 26
27 // Override from BrowsertestBase::Mixin. 27 // Override from BrowsertestBase::Mixin.
28 virtual void SetUpInProcessBrowserTestFixture() override; 28 void SetUpInProcessBrowserTestFixture() override;
29 29
30 // Override from BrowsertestBase::Mixin. 30 // Override from BrowsertestBase::Mixin.
31 virtual void SetUpCommandLine(base::CommandLine* command_line) override; 31 void SetUpCommandLine(base::CommandLine* command_line) override;
32 32
33 // Runs screenshot testing if it is turned on by command line switches. 33 // Runs screenshot testing if it is turned on by command line switches.
34 void RunScreenshotTesting(const std::string& test_name); 34 void RunScreenshotTesting(const std::string& test_name);
35 35
36 // Remembers that area |area| should be ignored during comparison. 36 // Remembers that area |area| should be ignored during comparison.
37 void IgnoreArea(const SkIRect& area); 37 void IgnoreArea(const SkIRect& area);
38 38
39 private: 39 private:
40 // It turns out that it takes some more time for the animation 40 // It turns out that it takes some more time for the animation
41 // to finish loading even after all the notifications have been sent. 41 // to finish loading even after all the notifications have been sent.
(...skipping 15 matching lines...) Expand all
57 bool enable_test_screenshots_; 57 bool enable_test_screenshots_;
58 58
59 // |screenshot_tester_ | does everything connected with taking, loading and 59 // |screenshot_tester_ | does everything connected with taking, loading and
60 // comparing screenshots 60 // comparing screenshots
61 ScreenshotTester screenshot_tester_; 61 ScreenshotTester screenshot_tester_;
62 }; 62 };
63 63
64 } // namespace chromeos 64 } // namespace chromeos
65 65
66 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENSHOT_TESTING_SCREENSHOT_TESTING_M IXIN_H_ 66 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENSHOT_TESTING_SCREENSHOT_TESTING_M IXIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698