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

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

Issue 2680423003: Reduce namespaces for ash::launcher::AppLauncherId (Closed)
Patch Set: Created 3 years, 10 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/ui/ash/launcher/chrome_launcher_controller_impl.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 manifest, Extension::NO_FLAGS, 400 manifest, Extension::NO_FLAGS,
401 ArcSupportHost::kHostAppId, &error); 401 ArcSupportHost::kHostAppId, &error);
402 extension_service_->AddExtension(extension_chrome_.get()); 402 extension_service_->AddExtension(extension_chrome_.get());
403 } 403 }
404 404
405 // Creates a running platform V2 app (not pinned) of type |app_id|. 405 // Creates a running platform V2 app (not pinned) of type |app_id|.
406 virtual void CreateRunningV2App(const std::string& app_id) { 406 virtual void CreateRunningV2App(const std::string& app_id) {
407 DCHECK(!test_controller_); 407 DCHECK(!test_controller_);
408 ash::ShelfID id = 408 ash::ShelfID id =
409 launcher_controller_->CreateAppShortcutLauncherItemWithType( 409 launcher_controller_->CreateAppShortcutLauncherItemWithType(
410 ash::launcher::AppLauncherId(app_id), model_->item_count(), 410 ash::AppLauncherId(app_id), model_->item_count(), ash::TYPE_APP);
411 ash::TYPE_APP);
412 DCHECK(id); 411 DCHECK(id);
413 // Change the created launcher controller into a V2 app controller. 412 // Change the created launcher controller into a V2 app controller.
414 test_controller_ = new TestV2AppLauncherItemController(app_id, 413 test_controller_ = new TestV2AppLauncherItemController(app_id,
415 launcher_controller_.get()); 414 launcher_controller_.get());
416 launcher_controller_->SetItemController(id, test_controller_); 415 launcher_controller_->SetItemController(id, test_controller_);
417 DCHECK(launcher_controller_->IsPlatformApp(id)); 416 DCHECK(launcher_controller_->IsPlatformApp(id));
418 launcher_controller_->SetItemStatus(id, ash::STATUS_RUNNING); 417 launcher_controller_->SetItemStatus(id, ash::STATUS_RUNNING);
419 } 418 }
420 419
421 // Sets the stage for a multi user test. 420 // Sets the stage for a multi user test.
(...skipping 3790 matching lines...) Expand 10 before | Expand all | Expand 10 after
4212 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, 4211 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
4213 shelf_controller->auto_hide()); 4212 shelf_controller->auto_hide());
4214 EXPECT_EQ(2u, shelf_controller->auto_hide_change_count()); 4213 EXPECT_EQ(2u, shelf_controller->auto_hide_change_count());
4215 4214
4216 PrefService* prefs = profile()->GetTestingPrefService(); 4215 PrefService* prefs = profile()->GetTestingPrefService();
4217 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignmentLocal)); 4216 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignmentLocal));
4218 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignment)); 4217 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignment));
4219 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehaviorLocal)); 4218 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehaviorLocal));
4220 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehavior)); 4219 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehavior));
4221 } 4220 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698