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

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

Issue 8776035: Add PanelOverflowStrip to handle panel overflow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix 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
« no previous file with comments | « no previous file | chrome/browser/ui/panels/panel.h » ('j') | chrome/browser/ui/panels/panel.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 // Restore focus where it was. It will deactivate the new panel. 304 // Restore focus where it was. It will deactivate the new panel.
305 last_active_browser->window()->Activate(); 305 last_active_browser->window()->Activate();
306 } else { 306 } else {
307 panel->ShowInactive(); 307 panel->ShowInactive();
308 } 308 }
309 #else 309 #else
310 panel->ShowInactive(); 310 panel->ShowInactive();
311 #endif 311 #endif
312 } 312 }
313 MessageLoopForUI::current()->RunAllPending(); 313 MessageLoopForUI::current()->RunAllPending();
314
314 // More waiting, because gaining or losing focus may require inter-process 315 // More waiting, because gaining or losing focus may require inter-process
315 // asynchronous communication, and it is not enough to just run the local 316 // asynchronous communication, and it is not enough to just run the local
316 // message loop to make sure this activity has completed. 317 // message loop to make sure this activity has completed.
317 WaitForPanelActiveState(panel, params.show_flag); 318 // Note that overflow panel will not be shown as active.
jennb 2011/12/02 21:16:58 Let's not allow tests create panels that start out
jianli 2011/12/02 23:23:46 Removed.
319 ActiveState show_flag = params.show_flag;
320 if (panel->expansion_state() == Panel::IN_OVERFLOW)
321 show_flag = SHOW_AS_INACTIVE;
322 WaitForPanelActiveState(panel, show_flag);
318 323
319 // On Linux, window size is not available right away and we should wait 324 // On Linux, window size is not available right away and we should wait
320 // before moving forward with the test. 325 // before moving forward with the test.
321 WaitForWindowSizeAvailable(panel); 326 WaitForWindowSizeAvailable(panel);
322 327
323 // Wait for the bounds animations on creation to finish. 328 // Wait for the bounds animations on creation to finish.
324 WaitForBoundsAnimationFinished(panel); 329 WaitForBoundsAnimationFinished(panel);
325 330
326 return panel; 331 return panel;
327 } 332 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 std::string error; 366 std::string error;
362 scoped_refptr<Extension> extension = Extension::Create( 367 scoped_refptr<Extension> extension = Extension::Create(
363 full_path, location, *input_value, 368 full_path, location, *input_value,
364 Extension::STRICT_ERROR_CHECKS, &error); 369 Extension::STRICT_ERROR_CHECKS, &error);
365 EXPECT_TRUE(extension.get()); 370 EXPECT_TRUE(extension.get());
366 EXPECT_STREQ("", error.c_str()); 371 EXPECT_STREQ("", error.c_str());
367 browser()->GetProfile()->GetExtensionService()-> 372 browser()->GetProfile()->GetExtensionService()->
368 OnExtensionInstalled(extension.get(), false, -1); 373 OnExtensionInstalled(extension.get(), false, -1);
369 return extension; 374 return extension;
370 } 375 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/panel.h » ('j') | chrome/browser/ui/panels/panel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698