OLD | NEW |
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 "apps/app_shim/extension_app_shim_handler_mac.h" | 5 #include "apps/app_shim/extension_app_shim_handler_mac.h" |
6 | 6 |
7 #include "apps/app_shim/app_shim_host_mac.h" | 7 #include "apps/app_shim/app_shim_host_mac.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/common/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
11 #include "chrome/test/base/testing_profile.h" | 11 #include "chrome/test/base/testing_profile.h" |
12 #include "content/public/browser/notification_service.h" | 12 #include "content/public/browser/notification_service.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace apps { | 16 namespace apps { |
17 | 17 |
18 using extensions::Extension; | 18 using extensions::Extension; |
19 typedef extensions::ShellWindowRegistry::ShellWindowList ShellWindowList; | 19 typedef extensions::ShellWindowRegistry::ShellWindowList ShellWindowList; |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 .WillRepeatedly(Return(&profile_a_)); | 332 .WillRepeatedly(Return(&profile_a_)); |
333 EXPECT_CALL(*delegate_, LoadProfileAsync(profile_path_a_, _)) | 333 EXPECT_CALL(*delegate_, LoadProfileAsync(profile_path_a_, _)) |
334 .WillOnce(Invoke(delegate_, &MockDelegate::CaptureLoadProfileCallback)); | 334 .WillOnce(Invoke(delegate_, &MockDelegate::CaptureLoadProfileCallback)); |
335 handler_->OnShimLaunch(&host_aa_, APP_SHIM_LAUNCH_NORMAL); | 335 handler_->OnShimLaunch(&host_aa_, APP_SHIM_LAUNCH_NORMAL); |
336 EXPECT_FALSE(handler_->FindHost(&profile_a_, kTestAppIdA)); | 336 EXPECT_FALSE(handler_->FindHost(&profile_a_, kTestAppIdA)); |
337 delegate_->RunLoadProfileCallback(profile_path_a_, &profile_a_); | 337 delegate_->RunLoadProfileCallback(profile_path_a_, &profile_a_); |
338 EXPECT_TRUE(handler_->FindHost(&profile_a_, kTestAppIdA)); | 338 EXPECT_TRUE(handler_->FindHost(&profile_a_, kTestAppIdA)); |
339 } | 339 } |
340 | 340 |
341 } // namespace apps | 341 } // namespace apps |
OLD | NEW |