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

Side by Side Diff: chrome/browser/extensions/api/feedback_private/feedback_browsertest.cc

Issue 2728773003: Make email field in Feedback app uneditable (Closed)
Patch Set: More nits Created 3 years, 9 months 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 "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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 bool bool_result = false; 104 bool bool_result = false;
105 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( 105 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
106 content, 106 content,
107 "domAutomationController.send(" 107 "domAutomationController.send("
108 "$('page-url').hidden && $('attach-file-container').hidden && " 108 "$('page-url').hidden && $('attach-file-container').hidden && "
109 "$('attach-file-note').hidden);", 109 "$('attach-file-note').hidden);",
110 &bool_result)); 110 &bool_result));
111 EXPECT_TRUE(bool_result); 111 EXPECT_TRUE(bool_result);
112 } 112 }
113 113
114 // Tests that there's an option in the email drop down box with a value
115 // 'anonymous_user'.
116 IN_PROC_BROWSER_TEST_F(FeedbackTest, AnonymousUser) {
117 WaitForExtensionViewsToLoad();
118
119 ASSERT_TRUE(IsFeedbackAppAvailable());
120 StartFeedbackUI(FeedbackFlow::FEEDBACK_FLOW_REGULAR);
121 VerifyFeedbackAppLaunch();
122
123 AppWindow* const window =
124 PlatformAppBrowserTest::GetFirstAppWindowForBrowser(browser());
125 ASSERT_TRUE(window);
126 content::WebContents* const content = window->web_contents();
127
128 bool bool_result = false;
129 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
130 content,
131 "domAutomationController.send("
132 " ((function() {"
133 " var options = $('user-email-drop-down').options;"
134 " for (var option in options) {"
135 " if (options[option].value == 'anonymous_user')"
136 " return true;"
137 " }"
138 " return false;"
139 " })()));",
140 &bool_result));
141
142 EXPECT_TRUE(bool_result);
143 }
144
114 } // namespace extensions 145 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/extensions/api/feedback_private/feedback_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698