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

Unified 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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_browsertest.h
diff --git a/chrome/browser/extensions/extension_browsertest.h b/chrome/browser/extensions/extension_browsertest.h
new file mode 100644
index 0000000000000000000000000000000000000000..385fd9eb8e6e8279ac43ed226927662660685e03
--- /dev/null
+++ b/chrome/browser/extensions/extension_browsertest.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_TEST_H_
+#define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_TEST_H_
+
+#include <string>
+
+#include "base/command_line.h"
+#include "base/file_path.h"
+#include "chrome/common/notification_details.h"
+#include "chrome/common/notification_observer.h"
+#include "chrome/common/notification_registrar.h"
+#include "chrome/common/notification_type.h"
+#include "chrome/test/in_process_browser_test.h"
+
+// Base class for extension browser tests. Provides utilities for loading,
+// unloading, and installing extensions.
+class ExtensionBrowserTest
+ : public InProcessBrowserTest, public NotificationObserver {
+ protected:
+ virtual void SetUpCommandLine(CommandLine* command_line);
+ bool LoadExtension(const FilePath& path);
+ bool InstallExtension(const FilePath& path);
+ void UninstallExtension(const std::string& extension_id);
+
+ bool loaded_;
+ bool installed_;
+ FilePath test_data_dir_;
+
+ private:
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+ bool WaitForExtensionHostsToLoad();
+
+ NotificationRegistrar registrar_;
+};
+
+#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_TEST_H_
« 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