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/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 static const int kBrowserWidth = 1000; | 36 static const int kBrowserWidth = 1000; |
37 static const int kBrowserHeight = 600; | 37 static const int kBrowserHeight = 600; |
38 | 38 |
39 class PDFBrowserTest : public InProcessBrowserTest, | 39 class PDFBrowserTest : public InProcessBrowserTest, |
40 public content::NotificationObserver { | 40 public content::NotificationObserver { |
41 public: | 41 public: |
42 PDFBrowserTest() | 42 PDFBrowserTest() |
43 : snapshot_different_(true), | 43 : snapshot_different_(true), |
44 next_dummy_search_value_(0), | 44 next_dummy_search_value_(0), |
45 load_stop_notification_count_(0) { | 45 load_stop_notification_count_(0) { |
46 EnableDOMAutomation(); | |
47 | |
48 pdf_test_server_.reset(new net::TestServer( | 46 pdf_test_server_.reset(new net::TestServer( |
49 net::TestServer::TYPE_HTTP, | 47 net::TestServer::TYPE_HTTP, |
50 net::TestServer::kLocalhost, | 48 net::TestServer::kLocalhost, |
51 FilePath(FILE_PATH_LITERAL("pdf/test")))); | 49 FilePath(FILE_PATH_LITERAL("pdf/test")))); |
52 } | 50 } |
53 | 51 |
54 protected: | 52 protected: |
55 // 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. |
56 net::TestServer* pdf_test_server() { return pdf_test_server_.get(); } | 54 net::TestServer* pdf_test_server() { return pdf_test_server_.get(); } |
57 | 55 |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 chrome::GetActiveWebContents(browser())->GetRenderViewHost(), | 353 chrome::GetActiveWebContents(browser())->GetRenderViewHost(), |
356 std::wstring(), | 354 std::wstring(), |
357 L"reloadPDF();")); | 355 L"reloadPDF();")); |
358 observer.Wait(); | 356 observer.Wait(); |
359 | 357 |
360 ASSERT_EQ("success", | 358 ASSERT_EQ("success", |
361 chrome::GetActiveWebContents(browser())->GetURL().query()); | 359 chrome::GetActiveWebContents(browser())->GetURL().query()); |
362 } | 360 } |
363 | 361 |
364 } // namespace | 362 } // namespace |
OLD | NEW |