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

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

Issue 8772068: Add PyAuto tests for triggering browser/page action. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_
6 #define CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 12
13 class Browser; 13 class Browser;
14 14
15 namespace gfx { 15 namespace gfx {
16 class Rect; 16 class Rect;
17 class Size; 17 class Size;
18 } // namespace gfx 18 } // namespace gfx
19 19
20 class BrowserActionTestUtil { 20 class BrowserActionTestUtil {
21 public: 21 public:
22 explicit BrowserActionTestUtil(Browser* browser) : browser_(browser) {} 22 explicit BrowserActionTestUtil(Browser* browser) : browser_(browser) {}
23 23
24 // Returns the number of browser action buttons in the window toolbar. 24 // Returns the number of browser action buttons in the window toolbar.
25 int NumberOfBrowserActions(); 25 int NumberOfBrowserActions();
26 26
27 // Returns the number of browser action currently visible. 27 // Returns the number of browser action currently visible.
28 int VisibleBrowserActions(); 28 int VisibleBrowserActions();
29 29
30 #if defined(TOOLKIT_VIEWS) 30 #if defined(TOOLKIT_VIEWS) && defined(UNIT_TEST)
31 // Waits for a browser action at |index| to get updated. 31 // Waits for a browser action at |index| to get updated.
32 void WaitForBrowserActionUpdated(int index); 32 void WaitForBrowserActionUpdated(int index);
33 #endif 33 #endif
34 34
35 // Returns whether the browser action at |index| has a non-null icon. Note 35 // Returns whether the browser action at |index| has a non-null icon. Note
36 // that the icon is loaded asynchronously, in which case you can wait for it 36 // that the icon is loaded asynchronously, in which case you can wait for it
37 // to load by calling WaitForBrowserActionUpdated. 37 // to load by calling WaitForBrowserActionUpdated.
38 bool HasIcon(int index); 38 bool HasIcon(int index);
39 39
40 // Simulates a user click on the browser action button at |index|. 40 // Simulates a user click on the browser action button at |index|.
(...skipping 21 matching lines...) Expand all
62 static gfx::Size GetMinPopupSize(); 62 static gfx::Size GetMinPopupSize();
63 63
64 // Returns the maximum allowed size of an extension popup. 64 // Returns the maximum allowed size of an extension popup.
65 static gfx::Size GetMaxPopupSize(); 65 static gfx::Size GetMaxPopupSize();
66 66
67 private: 67 private:
68 Browser* browser_; // weak 68 Browser* browser_; // weak
69 }; 69 };
70 70
71 #endif // CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ 71 #endif // CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/extensions/browser_action_test_util_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698