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

Side by Side Diff: chrome/browser/extensions/browser_action_test_util_views.cc

Issue 567037: Initial work on making extensions work in incognito mode. (Closed)
Patch Set: added experimental requirement Created 10 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 (c) 2009 The Chromium Authors. All rights reserved. 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 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 #include "chrome/browser/extensions/browser_action_test_util.h" 5 #include "chrome/browser/extensions/browser_action_test_util.h"
6 6
7 #include "base/gfx/rect.h" 7 #include "base/gfx/rect.h"
8 #include "base/gfx/size.h" 8 #include "base/gfx/size.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/browser.h" 10 #include "chrome/browser/browser.h"
(...skipping 23 matching lines...) Expand all
34 return !GetContainer(browser_)->GetBrowserActionViewAt(index)-> 34 return !GetContainer(browser_)->GetBrowserActionViewAt(index)->
35 button()->icon().empty(); 35 button()->icon().empty();
36 } 36 }
37 37
38 void BrowserActionTestUtil::Press(int index) { 38 void BrowserActionTestUtil::Press(int index) {
39 GetContainer(browser_)->TestExecuteBrowserAction(index); 39 GetContainer(browser_)->TestExecuteBrowserAction(index);
40 } 40 }
41 41
42 std::string BrowserActionTestUtil::GetTooltip(int index) { 42 std::string BrowserActionTestUtil::GetTooltip(int index) {
43 std::wstring text; 43 std::wstring text;
44 GetContainer(browser_)->GetBrowserActionViewAt(0)->button()-> 44 GetContainer(browser_)->GetBrowserActionViewAt(index)->button()->
45 GetTooltipText(0, 0, &text); 45 GetTooltipText(0, 0, &text);
46 return WideToUTF8(text); 46 return WideToUTF8(text);
47 } 47 }
48 48
49 bool BrowserActionTestUtil::HasPopup() { 49 bool BrowserActionTestUtil::HasPopup() {
50 return GetContainer(browser_)->TestGetPopup() != NULL; 50 return GetContainer(browser_)->TestGetPopup() != NULL;
51 } 51 }
52 52
53 gfx::Rect BrowserActionTestUtil::GetPopupBounds() { 53 gfx::Rect BrowserActionTestUtil::GetPopupBounds() {
54 return GetContainer(browser_)->TestGetPopup()->view()->bounds(); 54 return GetContainer(browser_)->TestGetPopup()->view()->bounds();
55 } 55 }
56 56
57 bool BrowserActionTestUtil::HidePopup() { 57 bool BrowserActionTestUtil::HidePopup() {
58 BrowserActionsContainer* container = GetContainer(browser_); 58 BrowserActionsContainer* container = GetContainer(browser_);
59 container->HidePopup(); 59 container->HidePopup();
60 return !HasPopup(); 60 return !HasPopup();
61 } 61 }
62 62
63 gfx::Size BrowserActionTestUtil::GetMinPopupSize() { 63 gfx::Size BrowserActionTestUtil::GetMinPopupSize() {
64 return gfx::Size(ExtensionPopup::kMinWidth, ExtensionPopup::kMinHeight); 64 return gfx::Size(ExtensionPopup::kMinWidth, ExtensionPopup::kMinHeight);
65 } 65 }
66 66
67 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { 67 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() {
68 return gfx::Size(ExtensionPopup::kMaxWidth, ExtensionPopup::kMaxHeight); 68 return gfx::Size(ExtensionPopup::kMaxWidth, ExtensionPopup::kMaxHeight);
69 } 69 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/browser_action_apitest.cc ('k') | chrome/browser/extensions/extension_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698