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

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

Issue 10778044: Always enable dom automation for browser_tests. This avoids developers having to call EnableDOMAuto… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/old_base_panel_browser_test.cc ('k') | chrome/browser/ui/views/keyboard_access_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698