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

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

Issue 637933002: Replace FINAL and OVERRIDE with their C++11 counterparts in chrome/test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/test/base/ui_test_utils.h ('k') | chrome/test/base/view_event_test_base.h » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_V8_UNIT_TEST_H_ 5 #ifndef CHROME_TEST_BASE_V8_UNIT_TEST_H_
6 #define CHROME_TEST_BASE_V8_UNIT_TEST_H_ 6 #define CHROME_TEST_BASE_V8_UNIT_TEST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/strings/string_piece.h" 12 #include "base/strings/string_piece.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "v8/include/v8.h" 14 #include "v8/include/v8.h"
15 15
16 // A superclass for unit tests that involve running JavaScript. This class 16 // A superclass for unit tests that involve running JavaScript. This class
17 // sets up V8 context and has methods that make it easy to execute scripts in 17 // sets up V8 context and has methods that make it easy to execute scripts in
18 // this context as well as call functions in the context. 18 // this context as well as call functions in the context.
19 class V8UnitTest : public testing::Test { 19 class V8UnitTest : public testing::Test {
20 public: 20 public:
21 V8UnitTest(); 21 V8UnitTest();
22 virtual ~V8UnitTest(); 22 virtual ~V8UnitTest();
23 23
24 // Methods from testing::Test. 24 // Methods from testing::Test.
25 virtual void SetUp() OVERRIDE; 25 virtual void SetUp() override;
26 26
27 protected: 27 protected:
28 // Add a custom helper JS library for your test. If |library_path| is 28 // Add a custom helper JS library for your test. If |library_path| is
29 // relative, it'll be read as relative to the test data dir. 29 // relative, it'll be read as relative to the test data dir.
30 void AddLibrary(const base::FilePath& library_path); 30 void AddLibrary(const base::FilePath& library_path);
31 31
32 // Runs |test_fixture|.|test_name| using the framework in test_api.js. 32 // Runs |test_fixture|.|test_name| using the framework in test_api.js.
33 bool RunJavascriptTestF(const std::string& test_fixture, 33 bool RunJavascriptTestF(const std::string& test_fixture,
34 const std::string& test_name); 34 const std::string& test_name);
35 35
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 v8::HandleScope handle_scope_; 78 v8::HandleScope handle_scope_;
79 79
80 // Context for the JavaScript in the test. 80 // Context for the JavaScript in the test.
81 v8::Persistent<v8::Context> context_; 81 v8::Persistent<v8::Context> context_;
82 82
83 // User added libraries. 83 // User added libraries.
84 std::vector<base::FilePath> user_libraries_; 84 std::vector<base::FilePath> user_libraries_;
85 }; 85 };
86 86
87 #endif // CHROME_TEST_BASE_V8_UNIT_TEST_H_ 87 #endif // CHROME_TEST_BASE_V8_UNIT_TEST_H_
OLDNEW
« no previous file with comments | « chrome/test/base/ui_test_utils.h ('k') | chrome/test/base/view_event_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698