Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_RESOURCES_CHROMEOS_CHROMEVOX_CHROMEVOX_BROWSERTEST_H_ | |
| 6 #define CHROME_BROWSER_RESOURCES_CHROMEOS_CHROMEVOX_CHROMEVOX_BROWSERTEST_H_ | |
| 7 | |
| 8 #include "chrome/test/base/javascript_browsertest.h" | |
| 9 #include "content/public/browser/notification_registrar.h" | |
| 10 #include "content/public/test/test_utils.h" | |
| 11 | |
| 12 // A super class that handles javascript-based tests against the ChromeVox | |
| 13 // component extension. | |
| 14 class ChromeVoxBrowserTest : public JavaScriptBrowserTest, | |
| 15 public content::NotificationObserver { | |
| 16 public: | |
| 17 ChromeVoxBrowserTest() : libs_loaded_(false) {} | |
| 18 | |
| 19 virtual ~ChromeVoxBrowserTest() {} | |
| 20 | |
| 21 virtual void Observe(int type, | |
| 22 const content::NotificationSource& source, | |
| 23 const content::NotificationDetails& details); | |
| 24 | |
| 25 protected: | |
| 26 // Methods InProcessBrowserTest overrides. | |
| 27 virtual void SetUpOnMainThread() OVERRIDE; | |
| 28 | |
| 29 // Implicit overrides assumed by js2gtest. | |
|
Peter Lundblad
2014/06/08 23:27:21
I don't know what an implicit override is. Can yo
David Tseng
2014/06/10 05:35:21
Done.
| |
| 30 // Runs |test_fixture|.|test_name| using the framework in test_api.js. | |
| 31 bool RunJavascriptTestF(bool is_async, | |
| 32 const std::string& test_fixture, | |
| 33 const std::string& test_name); | |
| 34 | |
| 35 private: | |
| 36 content::NotificationRegistrar registrar_; | |
| 37 scoped_refptr<content::MessageLoopRunner> chromevox_load_looper_; | |
| 38 bool libs_loaded_; | |
| 39 DISALLOW_COPY_AND_ASSIGN(ChromeVoxBrowserTest); | |
|
Peter Lundblad
2014/06/08 23:27:21
nit: blank line before this one.
David Tseng
2014/06/10 05:35:21
Done.
| |
| 40 }; | |
| 41 | |
| 42 #endif // CHROME_BROWSER_RESOURCES_CHROMEOS_CHROMEVOX_CHROMEVOX_BROWSERTEST_H_ | |
| OLD | NEW |