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

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

Issue 880063002: Ensure WebView notifies desktop automation on creation, destruction, and change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix leaks? Created 5 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
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_EXTENSION_JS_BROWSER_TEST_H_ 5 #ifndef CHROME_TEST_BASE_EXTENSION_JS_BROWSER_TEST_H_
6 #define CHROME_TEST_BASE_EXTENSION_JS_BROWSER_TEST_H_ 6 #define CHROME_TEST_BASE_EXTENSION_JS_BROWSER_TEST_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "chrome/test/base/extension_load_waiter_one_shot.h" 9 #include "chrome/test/base/extension_load_waiter_one_shot.h"
10 #include "chrome/test/base/javascript_browser_test.h" 10 #include "chrome/test/base/javascript_browser_test.h"
11 11
12 // A super class that handles javascript-based tests against an extension. 12 // A super class that handles javascript-based tests against an extension.
13 // 13 //
14 // See an example usage at 14 // See an example usage at
15 //chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs 15 //chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs
16 class ExtensionJSBrowserTest : public JavaScriptBrowserTest { 16 class ExtensionJSBrowserTest : public JavaScriptBrowserTest {
17 public: 17 public:
18 ExtensionJSBrowserTest(); 18 ExtensionJSBrowserTest();
19 19
20 virtual ~ExtensionJSBrowserTest(); 20 ~ExtensionJSBrowserTest() override;
21 21
22 protected: 22 protected:
23 // Waits for an extension to load; returns immediately if already loaded. 23 // Waits for an extension to load; returns immediately if already loaded.
24 void WaitForExtension(const char* extension_id, const base::Closure& load_cb); 24 void WaitForExtension(const char* extension_id, const base::Closure& load_cb);
25 25
26 // Method required for js2gtest. 26 // Method required for js2gtest.
27 // Runs |test_fixture|.|test_name| using the framework in test_api.js. 27 // Runs |test_fixture|.|test_name| using the framework in test_api.js.
28 bool RunJavascriptTestF(bool is_async, 28 bool RunJavascriptTestF(bool is_async,
29 const std::string& test_fixture, 29 const std::string& test_fixture,
30 const std::string& test_name); 30 const std::string& test_name);
31 31
32 private: 32 private:
33 scoped_ptr<ExtensionLoadWaiterOneShot> load_waiter_; 33 scoped_ptr<ExtensionLoadWaiterOneShot> load_waiter_;
34 bool libs_loaded_; 34 bool libs_loaded_;
35 35
36 DISALLOW_COPY_AND_ASSIGN(ExtensionJSBrowserTest); 36 DISALLOW_COPY_AND_ASSIGN(ExtensionJSBrowserTest);
37 }; 37 };
38 38
39 #endif // CHROME_TEST_BASE_EXTENSION_JS_BROWSER_TEST_H_ 39 #endif // CHROME_TEST_BASE_EXTENSION_JS_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/automation/automation_node.js ('k') | chrome/test/base/extension_load_waiter_one_shot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698