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

Side by Side Diff: chrome/test/base/javascript_browser_test.h

Issue 2045843002: Move console error detection in browser tests to higher level (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ftp-error
Patch Set: Created 4 years, 6 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
« no previous file with comments | « chrome/browser/net/ftp_browsertest.cc ('k') | chrome/test/base/javascript_browser_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_TEST_BASE_JAVASCRIPT_BROWSER_TEST_H_ 5 #ifndef CHROME_TEST_BASE_JAVASCRIPT_BROWSER_TEST_H_
6 #define CHROME_TEST_BASE_JAVASCRIPT_BROWSER_TEST_H_ 6 #define CHROME_TEST_BASE_JAVASCRIPT_BROWSER_TEST_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 16 matching lines...) Expand all
27 // as relative to the test data dir. 27 // as relative to the test data dir.
28 void AddLibrary(const base::FilePath& library_path); 28 void AddLibrary(const base::FilePath& library_path);
29 29
30 protected: 30 protected:
31 JavaScriptBrowserTest(); 31 JavaScriptBrowserTest();
32 32
33 ~JavaScriptBrowserTest() override; 33 ~JavaScriptBrowserTest() override;
34 34
35 // InProcessBrowserTest overrides. 35 // InProcessBrowserTest overrides.
36 void SetUpOnMainThread() override; 36 void SetUpOnMainThread() override;
37 void TearDownOnMainThread() override;
37 38
38 // Builds a vector of strings of all added javascript libraries suitable for 39 // Builds a vector of strings of all added javascript libraries suitable for
39 // execution by subclasses. 40 // execution by subclasses.
40 void BuildJavascriptLibraries(std::vector<base::string16>* libraries); 41 void BuildJavascriptLibraries(std::vector<base::string16>* libraries);
41 42
42 // Builds a string with a call to the runTest JS function, passing the 43 // Builds a string with a call to the runTest JS function, passing the
43 // given |is_async|, |test_name| and its |args|. 44 // given |is_async|, |test_name| and its |args|.
44 // This is then suitable for execution by subclasses in a 45 // This is then suitable for execution by subclasses in a
45 // |RunJavaScriptBrowserTestF| call. 46 // |RunJavaScriptBrowserTestF| call.
46 base::string16 BuildRunTestJSCall(bool is_async, 47 base::string16 BuildRunTestJSCall(bool is_async,
47 const std::string& test_name, 48 const std::string& test_name,
48 const ConstValueVector& args); 49 const ConstValueVector& args);
49 50
51 bool has_console_errors() const;
52 void set_has_console_errors(bool has_console_errors);
53
54 bool has_console_info() const;
55 void set_has_console_info(bool has_console_errors);
56
50 private: 57 private:
51 // User added libraries. 58 // User added libraries.
52 std::vector<base::FilePath> user_libraries_; 59 std::vector<base::FilePath> user_libraries_;
53 60
54 // User library search paths. 61 // User library search paths.
55 std::vector<base::FilePath> library_search_paths_; 62 std::vector<base::FilePath> library_search_paths_;
56 63
57 DISALLOW_COPY_AND_ASSIGN(JavaScriptBrowserTest); 64 DISALLOW_COPY_AND_ASSIGN(JavaScriptBrowserTest);
58 }; 65 };
59 66
60 #endif // CHROME_TEST_BASE_JAVASCRIPT_BROWSER_TEST_H_ 67 #endif // CHROME_TEST_BASE_JAVASCRIPT_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/ftp_browsertest.cc ('k') | chrome/test/base/javascript_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698