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

Side by Side Diff: chrome/browser/ui/ash/launcher/browser_launcher_item_controller_unittest.cc

Issue 14222019: Trying to activate a window in a workspace other than the current is ignored while a system modal d… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 8 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) 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/ash/launcher/browser_launcher_item_controller.h" 5 #include "chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 virtual bool ShouldActivate() const OVERRIDE { 194 virtual bool ShouldActivate() const OVERRIDE {
195 return true; 195 return true;
196 } 196 }
197 197
198 // aura::client::ActivationChangeObserver overrides: 198 // aura::client::ActivationChangeObserver overrides:
199 virtual void OnWindowActivated(aura::Window* gained_active, 199 virtual void OnWindowActivated(aura::Window* gained_active,
200 aura::Window* lost_active) OVERRIDE { 200 aura::Window* lost_active) OVERRIDE {
201 DCHECK(&window == gained_active || &window == lost_active); 201 DCHECK(&window == gained_active || &window == lost_active);
202 updater.BrowserActivationStateChanged(); 202 updater.BrowserActivationStateChanged();
203 } 203 }
204 virtual void OnWindowActivationRequestCompleted(
205 aura::Window* request_active, aura::Window* actual_active) OVERRIDE {
206 }
204 207
205 BrowserLauncherItemControllerTest* launcher_test; 208 BrowserLauncherItemControllerTest* launcher_test;
206 aura::Window window; 209 aura::Window window;
207 TabHelperTabStripModelDelegate tab_strip_delegate; 210 TabHelperTabStripModelDelegate tab_strip_delegate;
208 TabStripModel tab_strip; 211 TabStripModel tab_strip;
209 BrowserLauncherItemController updater; 212 BrowserLauncherItemController updater;
210 213
211 private: 214 private:
212 DISALLOW_COPY_AND_ASSIGN(State); 215 DISALLOW_COPY_AND_ASSIGN(State);
213 }; 216 };
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 EXPECT_EQ(ash::STATUS_RUNNING, app_state.GetUpdaterItem().status); 409 EXPECT_EQ(ash::STATUS_RUNNING, app_state.GetUpdaterItem().status);
407 410
408 // App window should go to attention state. 411 // App window should go to attention state.
409 app_state.window.SetProperty(aura::client::kDrawAttentionKey, true); 412 app_state.window.SetProperty(aura::client::kDrawAttentionKey, true);
410 EXPECT_EQ(ash::STATUS_ATTENTION, app_state.GetUpdaterItem().status); 413 EXPECT_EQ(ash::STATUS_ATTENTION, app_state.GetUpdaterItem().status);
411 414
412 // Activating app window should clear attention state. 415 // Activating app window should clear attention state.
413 activation_client_->ActivateWindow(&app_state.window); 416 activation_client_->ActivateWindow(&app_state.window);
414 EXPECT_EQ(ash::STATUS_ACTIVE, app_state.GetUpdaterItem().status); 417 EXPECT_EQ(ash::STATUS_ACTIVE, app_state.GetUpdaterItem().status);
415 } 418 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698