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/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/files/file_enumerator.h" | 6 #include "base/files/file_enumerator.h" |
7 #include "base/hash.h" | 7 #include "base/hash.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 static const int kBrowserWidth = 1000; | 37 static const int kBrowserWidth = 1000; |
38 static const int kBrowserHeight = 600; | 38 static const int kBrowserHeight = 600; |
39 | 39 |
40 class PDFBrowserTest : public InProcessBrowserTest, | 40 class PDFBrowserTest : public InProcessBrowserTest, |
41 public testing::WithParamInterface<int>, | 41 public testing::WithParamInterface<int>, |
42 public content::NotificationObserver { | 42 public content::NotificationObserver { |
43 public: | 43 public: |
44 PDFBrowserTest() | 44 PDFBrowserTest() |
45 : snapshot_different_(true), | 45 : snapshot_different_(true), |
46 next_dummy_search_value_(0), | 46 next_dummy_search_value_(0), |
47 load_stop_notification_count_(0), | 47 load_stop_notification_count_(0) { |
48 pdf_test_server_( | |
49 content::BrowserThread::GetMessageLoopProxyForThread( | |
50 content::BrowserThread::IO)) { | |
51 pdf_test_server_.ServeFilesFromDirectory( | 48 pdf_test_server_.ServeFilesFromDirectory( |
52 base::FilePath(FILE_PATH_LITERAL("pdf/test"))); | 49 base::FilePath(FILE_PATH_LITERAL("pdf/test"))); |
53 } | 50 } |
54 | 51 |
55 protected: | 52 protected: |
56 // Use our own TestServer so that we can serve files from the pdf directory. | 53 // Use our own TestServer so that we can serve files from the pdf directory. |
57 net::test_server::EmbeddedTestServer* pdf_test_server() { | 54 net::test_server::EmbeddedTestServer* pdf_test_server() { |
58 return &pdf_test_server_; | 55 return &pdf_test_server_; |
59 } | 56 } |
60 | 57 |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 browser()->tab_strip_model()->GetActiveWebContents(), | 410 browser()->tab_strip_model()->GetActiveWebContents(), |
414 "reloadPDF();")); | 411 "reloadPDF();")); |
415 observer.Wait(); | 412 observer.Wait(); |
416 | 413 |
417 ASSERT_EQ("success", | 414 ASSERT_EQ("success", |
418 browser()->tab_strip_model()->GetActiveWebContents()-> | 415 browser()->tab_strip_model()->GetActiveWebContents()-> |
419 GetURL().query()); | 416 GetURL().query()); |
420 } | 417 } |
421 | 418 |
422 } // namespace | 419 } // namespace |
OLD | NEW |