| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 private: | 74 private: |
| 75 void InvokeFeedbackUI(FeedbackFlow flow) { | 75 void InvokeFeedbackUI(FeedbackFlow flow) { |
| 76 extensions::FeedbackPrivateAPI* api = | 76 extensions::FeedbackPrivateAPI* api = |
| 77 extensions::FeedbackPrivateAPI::GetFactoryInstance()->Get( | 77 extensions::FeedbackPrivateAPI::GetFactoryInstance()->Get( |
| 78 browser()->profile()); | 78 browser()->profile()); |
| 79 api->RequestFeedbackForFlow("Test description", "Test tag", | 79 api->RequestFeedbackForFlow("Test description", "Test tag", |
| 80 GURL("http://www.test.com"), flow); | 80 GURL("http://www.test.com"), flow); |
| 81 } | 81 } |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 // http://crbug.com/601433 | 84 IN_PROC_BROWSER_TEST_F(FeedbackTest, ShowFeedback) { |
| 85 #if defined(OS_CHROMEOS) | |
| 86 #define MAYBE_ShowFeedback DISABLED_ShowFeedback | |
| 87 #else | |
| 88 #define MAYBE_ShowFeedback ShowFeedback | |
| 89 #endif | |
| 90 IN_PROC_BROWSER_TEST_F(FeedbackTest, MAYBE_ShowFeedback) { | |
| 91 WaitForExtensionViewsToLoad(); | 85 WaitForExtensionViewsToLoad(); |
| 92 | 86 |
| 93 ASSERT_TRUE(IsFeedbackAppAvailable()); | 87 ASSERT_TRUE(IsFeedbackAppAvailable()); |
| 94 StartFeedbackUI(FeedbackFlow::FEEDBACK_FLOW_REGULAR); | 88 StartFeedbackUI(FeedbackFlow::FEEDBACK_FLOW_REGULAR); |
| 95 VerifyFeedbackAppLaunch(); | 89 VerifyFeedbackAppLaunch(); |
| 96 } | 90 } |
| 97 | 91 |
| 98 IN_PROC_BROWSER_TEST_F(FeedbackTest, ShowLoginFeedback) { | 92 IN_PROC_BROWSER_TEST_F(FeedbackTest, ShowLoginFeedback) { |
| 99 WaitForExtensionViewsToLoad(); | 93 WaitForExtensionViewsToLoad(); |
| 100 | 94 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 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 |