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_window.h" | 5 #include "apps/app_window.h" |
6 #include "apps/app_window_registry.h" | 6 #include "apps/app_window_registry.h" |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/apps/app_browsertest_util.h" | 8 #include "chrome/browser/apps/app_browsertest_util.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h" | 10 #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 PlatformAppBrowserTest::GetFirstAppWindowForBrowser(browser()); | 66 PlatformAppBrowserTest::GetFirstAppWindowForBrowser(browser()); |
67 ASSERT_TRUE(window); | 67 ASSERT_TRUE(window); |
68 const Extension* feedback_app = window->extension(); | 68 const Extension* feedback_app = window->extension(); |
69 ASSERT_TRUE(feedback_app); | 69 ASSERT_TRUE(feedback_app); |
70 EXPECT_EQ(feedback_app->id(), std::string(kFeedbackExtensionId)); | 70 EXPECT_EQ(feedback_app->id(), std::string(kFeedbackExtensionId)); |
71 } | 71 } |
72 | 72 |
73 private: | 73 private: |
74 void InvokeFeedbackUI() { | 74 void InvokeFeedbackUI() { |
75 extensions::FeedbackPrivateAPI* api = | 75 extensions::FeedbackPrivateAPI* api = |
76 extensions::FeedbackPrivateAPI::GetFactoryInstance()->GetForProfile( | 76 extensions::FeedbackPrivateAPI::GetFactoryInstance()->Get( |
77 browser()->profile()); | 77 browser()->profile()); |
78 api->RequestFeedback("Test description", | 78 api->RequestFeedback("Test description", |
79 "Test tag", | 79 "Test tag", |
80 GURL("http://www.test.com")); | 80 GURL("http://www.test.com")); |
81 } | 81 } |
82 }; | 82 }; |
83 | 83 |
84 IN_PROC_BROWSER_TEST_F(FeedbackTest, ShowFeedback) { | 84 IN_PROC_BROWSER_TEST_F(FeedbackTest, ShowFeedback) { |
85 WaitForExtensionViewsToLoad(); | 85 WaitForExtensionViewsToLoad(); |
86 | 86 |
87 ASSERT_TRUE(IsFeedbackAppAvailable()); | 87 ASSERT_TRUE(IsFeedbackAppAvailable()); |
88 StartFeedbackUI(); | 88 StartFeedbackUI(); |
89 VerifyFeedbackAppLaunch(); | 89 VerifyFeedbackAppLaunch(); |
90 } | 90 } |
91 | 91 |
92 } // namespace extensions | 92 } // namespace extensions |
OLD | NEW |