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

Side by Side Diff: chrome/browser/ui/views/toolbar/browser_action_test_util_views.cc

Issue 640423003: Create a cross-platform browsertest for the browser actions bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Peter's Created 6 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_action_manager.h" 8 #include "chrome/browser/extensions/extension_action_manager.h"
9 #include "chrome/browser/extensions/extension_toolbar_model.h" 9 #include "chrome/browser/extensions/extension_toolbar_model.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 bool BrowserActionTestUtil::HidePopup() { 89 bool BrowserActionTestUtil::HidePopup() {
90 GetContainer(browser_)->HideActivePopup(); 90 GetContainer(browser_)->HideActivePopup();
91 return !HasPopup(); 91 return !HasPopup();
92 } 92 }
93 93
94 void BrowserActionTestUtil::SetIconVisibilityCount(size_t icons) { 94 void BrowserActionTestUtil::SetIconVisibilityCount(size_t icons) {
95 extensions::ExtensionToolbarModel::Get(browser_->profile())-> 95 extensions::ExtensionToolbarModel::Get(browser_->profile())->
96 SetVisibleIconCount(icons); 96 SetVisibleIconCount(icons);
97 } 97 }
98 98
99 // static
100 void BrowserActionTestUtil::DisableAnimations() {
101 BrowserActionsContainer::disable_animations_during_testing_ = true;
102 }
103
104 // static
105 void BrowserActionTestUtil::EnableAnimations() {
106 BrowserActionsContainer::disable_animations_during_testing_ = false;
107 }
108
109 // static
99 gfx::Size BrowserActionTestUtil::GetMinPopupSize() { 110 gfx::Size BrowserActionTestUtil::GetMinPopupSize() {
100 return gfx::Size(ExtensionPopup::kMinWidth, ExtensionPopup::kMinHeight); 111 return gfx::Size(ExtensionPopup::kMinWidth, ExtensionPopup::kMinHeight);
101 } 112 }
102 113
114 // static
103 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { 115 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() {
104 return gfx::Size(ExtensionPopup::kMaxWidth, ExtensionPopup::kMaxHeight); 116 return gfx::Size(ExtensionPopup::kMaxWidth, ExtensionPopup::kMaxHeight);
105 } 117 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698