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

Side by Side Diff: chrome/browser/ui/panels/base_panel_browser_test.cc

Issue 8423060: Classification of TODOs in Panel code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cr feedback Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/panels/base_panel_browser_test.h" 5 #include "chrome/browser/ui/panels/base_panel_browser_test.h"
6 6
7 #include "chrome/browser/ui/browser_list.h" 7 #include "chrome/browser/ui/browser_list.h"
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 panel_manager); 175 panel_manager);
176 panel_manager->set_auto_hiding_desktop_bar(mock_auto_hiding_desktop_bar_); 176 panel_manager->set_auto_hiding_desktop_bar(mock_auto_hiding_desktop_bar_);
177 panel_manager->SetWorkAreaForTesting(testing_work_area_); 177 panel_manager->SetWorkAreaForTesting(testing_work_area_);
178 panel_manager->enable_auto_sizing(false); 178 panel_manager->enable_auto_sizing(false);
179 panel_manager->remove_delays_for_testing(); 179 panel_manager->remove_delays_for_testing();
180 // This is needed so the subsequently created panels can be activated. 180 // This is needed so the subsequently created panels can be activated.
181 // On a Mac, it transforms background-only test process into foreground one. 181 // On a Mac, it transforms background-only test process into foreground one.
182 EXPECT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); 182 EXPECT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
183 } 183 }
184 184
185 // TODO(prasadt): If we start having even more of these WaitFor* pattern
186 // methods, refactor. The only way to refactor would be to pass in a function
187 // pointer, it may not be worth complicating the code till we have more of
188 // these.
189 void BasePanelBrowserTest::WaitForPanelActiveState( 185 void BasePanelBrowserTest::WaitForPanelActiveState(
190 Panel* panel, ActiveState expected_state) { 186 Panel* panel, ActiveState expected_state) {
191 DCHECK(expected_state == SHOW_AS_ACTIVE || 187 DCHECK(expected_state == SHOW_AS_ACTIVE ||
192 expected_state == SHOW_AS_INACTIVE); 188 expected_state == SHOW_AS_INACTIVE);
193 ui_test_utils::WindowedNotificationObserver signal( 189 ui_test_utils::WindowedNotificationObserver signal(
194 chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS, 190 chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
195 content::Source<Panel>(panel)); 191 content::Source<Panel>(panel));
196 if (panel->IsActive() == (expected_state == SHOW_AS_ACTIVE)) 192 if (panel->IsActive() == (expected_state == SHOW_AS_ACTIVE))
197 return; // Already in required state. 193 return; // Already in required state.
198 signal.Wait(); 194 signal.Wait();
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 std::string error; 323 std::string error;
328 scoped_refptr<Extension> extension = Extension::Create( 324 scoped_refptr<Extension> extension = Extension::Create(
329 full_path, location, *input_value, 325 full_path, location, *input_value,
330 Extension::STRICT_ERROR_CHECKS, &error); 326 Extension::STRICT_ERROR_CHECKS, &error);
331 EXPECT_TRUE(extension.get()); 327 EXPECT_TRUE(extension.get());
332 EXPECT_STREQ("", error.c_str()); 328 EXPECT_STREQ("", error.c_str());
333 browser()->GetProfile()->GetExtensionService()->OnLoadSingleExtension( 329 browser()->GetProfile()->GetExtensionService()->OnLoadSingleExtension(
334 extension.get(), false); 330 extension.get(), false);
335 return extension; 331 return extension;
336 } 332 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/auto_hiding_desktop_bar_gtk.cc ('k') | chrome/browser/ui/panels/panel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698