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

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

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 EXPECT_TRUE(panel->auto_resizable()); 359 EXPECT_TRUE(panel->auto_resizable());
360 } 360 }
361 361
362 if (params.show_flag == SHOW_AS_ACTIVE) { 362 if (params.show_flag == SHOW_AS_ACTIVE) {
363 panel->Show(); 363 panel->Show();
364 } else { 364 } else {
365 panel->ShowInactive(); 365 panel->ShowInactive();
366 } 366 }
367 367
368 if (params.wait_for_fully_created) { 368 if (params.wait_for_fully_created) {
369 MessageLoopForUI::current()->RunUntilIdle(); 369 base::MessageLoopForUI::current()->RunUntilIdle();
370 370
371 #if defined(OS_LINUX) 371 #if defined(OS_LINUX)
372 // On bots, we might have a simple window manager which always activates new 372 // On bots, we might have a simple window manager which always activates new
373 // windows, and can't always deactivate them. Re-activate the main tabbed 373 // windows, and can't always deactivate them. Re-activate the main tabbed
374 // browser to "deactivate" the newly created panel. 374 // browser to "deactivate" the newly created panel.
375 if (params.expected_active_state == SHOW_AS_INACTIVE && 375 if (params.expected_active_state == SHOW_AS_INACTIVE &&
376 ui::GuessWindowManager() == ui::WM_ICE_WM) { 376 ui::GuessWindowManager() == ui::WM_ICE_WM) {
377 // Wait for new panel to become active before deactivating to ensure 377 // Wait for new panel to become active before deactivating to ensure
378 // the activated notification is consumed before we wait for the panel 378 // the activated notification is consumed before we wait for the panel
379 // to become inactive. 379 // to become inactive.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 } 512 }
513 513
514 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { 514 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) {
515 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); 515 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position);
516 } 516 }
517 517
518 std::string BasePanelBrowserTest::MakePanelName(int index) { 518 std::string BasePanelBrowserTest::MakePanelName(int index) {
519 std::string panel_name("Panel"); 519 std::string panel_name("Panel");
520 return panel_name + base::IntToString(index); 520 return panel_name + base::IntToString(index);
521 } 521 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view_unittest.cc ('k') | chrome/browser/ui/panels/docked_panel_collection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698