| 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/hash.h" | 6 #include "base/hash.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 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_.reset(new net::TestServer( | 48 pdf_test_server_.reset(new net::TestServer( |
| 49 net::TestServer::TYPE_HTTP, | 49 net::TestServer::TYPE_HTTP, |
| 50 net::TestServer::kLocalhost, | 50 net::TestServer::kLocalhost, |
| 51 base::FilePath(FILE_PATH_LITERAL("pdf/test")))); | 51 net::TestServer::GetSourceRelativePath( |
| 52 base::FilePath(FILE_PATH_LITERAL("pdf/test"))))); |
| 52 } | 53 } |
| 53 | 54 |
| 54 protected: | 55 protected: |
| 55 // Use our own TestServer so that we can serve files from the pdf directory. | 56 // Use our own TestServer so that we can serve files from the pdf directory. |
| 56 net::TestServer* pdf_test_server() { return pdf_test_server_.get(); } | 57 net::TestServer* pdf_test_server() { return pdf_test_server_.get(); } |
| 57 | 58 |
| 58 int load_stop_notification_count() const { | 59 int load_stop_notification_count() const { |
| 59 return load_stop_notification_count_; | 60 return load_stop_notification_count_; |
| 60 } | 61 } |
| 61 | 62 |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 browser()->tab_strip_model()->GetActiveWebContents(), | 405 browser()->tab_strip_model()->GetActiveWebContents(), |
| 405 "reloadPDF();")); | 406 "reloadPDF();")); |
| 406 observer.Wait(); | 407 observer.Wait(); |
| 407 | 408 |
| 408 ASSERT_EQ("success", | 409 ASSERT_EQ("success", |
| 409 browser()->tab_strip_model()->GetActiveWebContents()-> | 410 browser()->tab_strip_model()->GetActiveWebContents()-> |
| 410 GetURL().query()); | 411 GetURL().query()); |
| 411 } | 412 } |
| 412 | 413 |
| 413 } // namespace | 414 } // namespace |
| OLD | NEW |