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

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

Issue 2341643002: Enhance chrome.app.window API for shelf integration with pinning support (cont.) (Closed)
Patch Set: Unit Test Fix Created 4 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
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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 arc_support_host_ = Extension::Create(base::FilePath(), Manifest::UNPACKED, 408 arc_support_host_ = Extension::Create(base::FilePath(), Manifest::UNPACKED,
409 manifest, Extension::NO_FLAGS, 409 manifest, Extension::NO_FLAGS,
410 ArcSupportHost::kHostAppId, &error); 410 ArcSupportHost::kHostAppId, &error);
411 } 411 }
412 412
413 // Creates a running V2 app (not pinned) of type |app_id|. 413 // Creates a running V2 app (not pinned) of type |app_id|.
414 virtual void CreateRunningV2App(const std::string& app_id) { 414 virtual void CreateRunningV2App(const std::string& app_id) {
415 DCHECK(!test_controller_); 415 DCHECK(!test_controller_);
416 ash::ShelfID id = 416 ash::ShelfID id =
417 launcher_controller_->CreateAppShortcutLauncherItemWithType( 417 launcher_controller_->CreateAppShortcutLauncherItemWithType(
418 app_id, 418 ash::launcher::AppLauncherId(app_id), model_->item_count(),
419 model_->item_count(),
420 ash::TYPE_PLATFORM_APP); 419 ash::TYPE_PLATFORM_APP);
421 DCHECK(id); 420 DCHECK(id);
422 // Change the created launcher controller into a V2 app controller. 421 // Change the created launcher controller into a V2 app controller.
423 test_controller_ = new TestV2AppLauncherItemController(app_id, 422 test_controller_ = new TestV2AppLauncherItemController(app_id,
424 launcher_controller_.get()); 423 launcher_controller_.get());
425 launcher_controller_->SetItemController(id, test_controller_); 424 launcher_controller_->SetItemController(id, test_controller_);
426 } 425 }
427 426
428 // Sets the stage for a multi user test. 427 // Sets the stage for a multi user test.
429 virtual void SetUpMultiUserScenario(syncer::SyncChangeList* user_a, 428 virtual void SetUpMultiUserScenario(syncer::SyncChangeList* user_a,
(...skipping 3578 matching lines...) Expand 10 before | Expand all | Expand 10 after
4008 app_service_->GetPinPosition(extension_misc::kChromeAppId))); 4007 app_service_->GetPinPosition(extension_misc::kChromeAppId)));
4009 EXPECT_TRUE( 4008 EXPECT_TRUE(
4010 position_1.Equals(app_service_->GetPinPosition(extension1_->id()))); 4009 position_1.Equals(app_service_->GetPinPosition(extension1_->id())));
4011 EXPECT_TRUE( 4010 EXPECT_TRUE(
4012 position_1.Equals(app_service_->GetPinPosition(extension1_->id()))); 4011 position_1.Equals(app_service_->GetPinPosition(extension1_->id())));
4013 EXPECT_TRUE( 4012 EXPECT_TRUE(
4014 position_2.Equals(app_service_->GetPinPosition(extension2_->id()))); 4013 position_2.Equals(app_service_->GetPinPosition(extension2_->id())));
4015 EXPECT_TRUE( 4014 EXPECT_TRUE(
4016 position_3.Equals(app_service_->GetPinPosition(extension3_->id()))); 4015 position_3.Equals(app_service_->GetPinPosition(extension3_->id())));
4017 } 4016 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698