| OLD | NEW |
| 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.h" | 7 #include "base/files/file.h" |
| 8 #include "base/files/file_enumerator.h" | 8 #include "base/files/file_enumerator.h" |
| 9 #include "base/hash.h" | 9 #include "base/hash.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 expected_filename_ = expected_filename; | 89 expected_filename_ = expected_filename; |
| 90 WebContents* web_contents = | 90 WebContents* web_contents = |
| 91 browser()->tab_strip_model()->GetActiveWebContents(); | 91 browser()->tab_strip_model()->GetActiveWebContents(); |
| 92 DCHECK(web_contents); | 92 DCHECK(web_contents); |
| 93 | 93 |
| 94 content::RenderWidgetHost* rwh = web_contents->GetRenderViewHost(); | 94 content::RenderWidgetHost* rwh = web_contents->GetRenderViewHost(); |
| 95 rwh->CopyFromBackingStore( | 95 rwh->CopyFromBackingStore( |
| 96 gfx::Rect(), | 96 gfx::Rect(), |
| 97 gfx::Size(), | 97 gfx::Size(), |
| 98 base::Bind(&PDFBrowserTest::CopyFromBackingStoreCallback, this), | 98 base::Bind(&PDFBrowserTest::CopyFromBackingStoreCallback, this), |
| 99 SkBitmap::kARGB_8888_Config); | 99 kN32_SkColorType); |
| 100 | 100 |
| 101 content::RunMessageLoop(); | 101 content::RunMessageLoop(); |
| 102 | 102 |
| 103 if (snapshot_different_) { | 103 if (snapshot_different_) { |
| 104 LOG(INFO) << "Rendering didn't match, see result " << | 104 LOG(INFO) << "Rendering didn't match, see result " << |
| 105 snapshot_filename_.value(); | 105 snapshot_filename_.value(); |
| 106 } | 106 } |
| 107 return !snapshot_different_; | 107 return !snapshot_different_; |
| 108 } | 108 } |
| 109 | 109 |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 &contents->GetController())); | 433 &contents->GetController())); |
| 434 ASSERT_TRUE(content::ExecuteScript( | 434 ASSERT_TRUE(content::ExecuteScript( |
| 435 browser()->tab_strip_model()->GetActiveWebContents(), | 435 browser()->tab_strip_model()->GetActiveWebContents(), |
| 436 "reloadPDF();")); | 436 "reloadPDF();")); |
| 437 observer.Wait(); | 437 observer.Wait(); |
| 438 | 438 |
| 439 ASSERT_EQ("success", contents->GetURL().query()); | 439 ASSERT_EQ("success", contents->GetURL().query()); |
| 440 } | 440 } |
| 441 | 441 |
| 442 } // namespace | 442 } // namespace |
| OLD | NEW |