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

Side by Side Diff: chrome/browser/extensions/extension_browsertest.h

Issue 150213: Add a ExtensionBrowserTest base class (Closed)
Patch Set: added timeouts fixed other tests Created 11 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 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_EXTENSIONS_EXTENSION_BROWSER_TEST_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_TEST_H_
7
8 #include <string>
9
10 #include "base/command_line.h"
11 #include "base/file_path.h"
12 #include "chrome/common/notification_details.h"
13 #include "chrome/common/notification_observer.h"
14 #include "chrome/common/notification_registrar.h"
15 #include "chrome/common/notification_type.h"
16 #include "chrome/test/in_process_browser_test.h"
17
18 // Base class for extension browser tests. Provides utilities for loading,
19 // unloading, and installing extensions.
20 class ExtensionBrowserTest
21 : public InProcessBrowserTest, public NotificationObserver {
22 protected:
23 virtual void SetUpCommandLine(CommandLine* command_line);
24 bool LoadExtension(const FilePath& path);
25 bool InstallExtension(const FilePath& path);
26 void UninstallExtension(const std::string& extension_id);
27
28 bool loaded_;
29 bool installed_;
30 FilePath test_data_dir_;
31
32 private:
33 virtual void Observe(NotificationType type,
34 const NotificationSource& source,
35 const NotificationDetails& details);
36 bool WaitForExtensionHostsToLoad();
37
38 NotificationRegistrar registrar_;
39 };
40
41 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_TEST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698