OLD | NEW |
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_UI_PDF_PDF_BROWSERTEST_BASE_H_ | 5 #ifndef CHROME_BROWSER_UI_PDF_PDF_BROWSERTEST_BASE_H_ |
6 #define CHROME_BROWSER_UI_PDF_PDF_BROWSERTEST_BASE_H_ | 6 #define CHROME_BROWSER_UI_PDF_PDF_BROWSERTEST_BASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 int load_stop_notification_count() const { | 36 int load_stop_notification_count() const { |
37 return load_stop_notification_count_; | 37 return load_stop_notification_count_; |
38 } | 38 } |
39 | 39 |
40 void Load(); | 40 void Load(); |
41 void WaitForResponse(); | 41 void WaitForResponse(); |
42 bool VerifySnapshot(const std::string& expected_filename); | 42 bool VerifySnapshot(const std::string& expected_filename); |
43 | 43 |
44 private: | 44 private: |
45 void CopyFromBackingStoreCallback(bool success, const SkBitmap& bitmap); | 45 void CopyFromBackingStoreCallback(bool success, |
| 46 const SkBitmap& bitmap, |
| 47 const int& response); |
46 | 48 |
47 // content::NotificationObserver | 49 // content::NotificationObserver |
48 virtual void Observe(int type, | 50 virtual void Observe(int type, |
49 const content::NotificationSource& source, | 51 const content::NotificationSource& source, |
50 const content::NotificationDetails& details) OVERRIDE; | 52 const content::NotificationDetails& details) OVERRIDE; |
51 | 53 |
52 // InProcessBrowserTest | 54 // InProcessBrowserTest |
53 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; | 55 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; |
54 | 56 |
55 // True if the snapshot differed from the expected value. | 57 // True if the snapshot differed from the expected value. |
56 bool snapshot_different_; | 58 bool snapshot_different_; |
57 // Internal variable used to synchronize to the renderer. | 59 // Internal variable used to synchronize to the renderer. |
58 int next_dummy_search_value_; | 60 int next_dummy_search_value_; |
59 // The filename of the bitmap to compare the snapshot to. | 61 // The filename of the bitmap to compare the snapshot to. |
60 std::string expected_filename_; | 62 std::string expected_filename_; |
61 // If the snapshot is different, holds the location where it's saved. | 63 // If the snapshot is different, holds the location where it's saved. |
62 base::FilePath snapshot_filename_; | 64 base::FilePath snapshot_filename_; |
63 // How many times we've seen chrome::LOAD_STOP. | 65 // How many times we've seen chrome::LOAD_STOP. |
64 int load_stop_notification_count_; | 66 int load_stop_notification_count_; |
65 | 67 |
66 net::test_server::EmbeddedTestServer pdf_test_server_; | 68 net::test_server::EmbeddedTestServer pdf_test_server_; |
67 | 69 |
68 DISALLOW_COPY_AND_ASSIGN(PDFBrowserTest); | 70 DISALLOW_COPY_AND_ASSIGN(PDFBrowserTest); |
69 }; | 71 }; |
70 | 72 |
71 #endif // CHROME_BROWSER_UI_PDF_PDF_BROWSERTEST_BASE_H_ | 73 #endif // CHROME_BROWSER_UI_PDF_PDF_BROWSERTEST_BASE_H_ |
OLD | NEW |