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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "chrome/browser/apps/app_browsertest_util.h" | 6 #include "chrome/browser/apps/app_browsertest_util.h" |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h" | 8 #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h" |
9 #include "chrome/browser/extensions/component_loader.h" | 9 #include "chrome/browser/extensions/component_loader.h" |
10 #include "chrome/browser/extensions/extension_browsertest.h" | 10 #include "chrome/browser/extensions/extension_browsertest.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(FeedbackFlow::FEEDBACK_FLOW_REGULAR); | 88 StartFeedbackUI(FeedbackFlow::FEEDBACK_FLOW_REGULAR); |
89 VerifyFeedbackAppLaunch(); | 89 VerifyFeedbackAppLaunch(); |
90 } | 90 } |
91 | 91 |
92 // http://crbug.com/601306 | 92 IN_PROC_BROWSER_TEST_F(FeedbackTest, ShowLoginFeedback) { |
93 #if defined(OS_CHROMEOS) | |
94 #define MAYBE_ShowLoginFeedback DISABLED_ShowLoginFeedback | |
95 #else | |
96 #define MAYBE_ShowLoginFeedback ShowLoginFeedback | |
97 #endif | |
98 IN_PROC_BROWSER_TEST_F(FeedbackTest, MAYBE_ShowLoginFeedback) { | |
99 WaitForExtensionViewsToLoad(); | 93 WaitForExtensionViewsToLoad(); |
100 | 94 |
101 ASSERT_TRUE(IsFeedbackAppAvailable()); | 95 ASSERT_TRUE(IsFeedbackAppAvailable()); |
102 StartFeedbackUI(FeedbackFlow::FEEDBACK_FLOW_LOGIN); | 96 StartFeedbackUI(FeedbackFlow::FEEDBACK_FLOW_LOGIN); |
103 VerifyFeedbackAppLaunch(); | 97 VerifyFeedbackAppLaunch(); |
104 | 98 |
105 AppWindow* const window = | 99 AppWindow* const window = |
106 PlatformAppBrowserTest::GetFirstAppWindowForBrowser(browser()); | 100 PlatformAppBrowserTest::GetFirstAppWindowForBrowser(browser()); |
107 ASSERT_TRUE(window); | 101 ASSERT_TRUE(window); |
108 content::WebContents* const content = window->web_contents(); | 102 content::WebContents* const content = window->web_contents(); |
109 | 103 |
110 bool bool_result = false; | 104 bool bool_result = false; |
111 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( | 105 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
112 content, | 106 content, |
113 "domAutomationController.send(" | 107 "domAutomationController.send(" |
114 "$('page-url').hidden && $('attach-file-container').hidden && " | 108 "$('page-url').hidden && $('attach-file-container').hidden && " |
115 "$('attach-file-note').hidden);", | 109 "$('attach-file-note').hidden);", |
116 &bool_result)); | 110 &bool_result)); |
117 EXPECT_TRUE(bool_result); | 111 EXPECT_TRUE(bool_result); |
118 } | 112 } |
119 | 113 |
120 } // namespace extensions | 114 } // namespace extensions |
OLD | NEW |