Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1502)

Side by Side Diff: chrome/browser/ui/pdf/pdf_browsertest.cc

Issue 12210088: Make the TestServer use an absolute document root path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: testserver uses absolute docroot path Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698