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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc

Issue 501273002: Update extension install prompt to reflect withheld permissions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update cocoa test, add default cases for compiler Created 6 years, 3 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
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_install_dialog_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/views/extensions/extension_install_dialog_view.h" 5 #include "chrome/browser/ui/views/extensions/extension_install_dialog_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_browsertest.h" 8 #include "chrome/browser/extensions/extension_browsertest.h"
9 #include "chrome/browser/extensions/extension_icon_manager.h" 9 #include "chrome/browser/extensions/extension_icon_manager.h"
10 #include "chrome/browser/extensions/extension_install_prompt.h" 10 #include "chrome/browser/extensions/extension_install_prompt.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 gfx::Image icon = gfx::Image::CreateFrom1xBitmap(icon_bitmap); 122 gfx::Image icon = gfx::Image::CreateFrom1xBitmap(icon_bitmap);
123 prompt_->set_icon(icon); 123 prompt_->set_icon(icon);
124 124
125 this->SetPromptPermissions(std::vector<base::string16>()); 125 this->SetPromptPermissions(std::vector<base::string16>());
126 this->SetPromptDetails(std::vector<base::string16>()); 126 this->SetPromptDetails(std::vector<base::string16>());
127 this->SetPromptRetainedFiles(std::vector<base::FilePath>()); 127 this->SetPromptRetainedFiles(std::vector<base::FilePath>());
128 } 128 }
129 129
130 void ExtensionInstallDialogViewTestBase::SetPromptPermissions( 130 void ExtensionInstallDialogViewTestBase::SetPromptPermissions(
131 std::vector<base::string16> permissions) { 131 std::vector<base::string16> permissions) {
132 prompt_->SetPermissions(permissions); 132 prompt_->SetPermissions(permissions,
133 ExtensionInstallPrompt::REGULAR_PERMISSIONS);
133 } 134 }
134 135
135 void ExtensionInstallDialogViewTestBase::SetPromptDetails( 136 void ExtensionInstallDialogViewTestBase::SetPromptDetails(
136 std::vector<base::string16> details) { 137 std::vector<base::string16> details) {
137 prompt_->SetPermissionsDetails(details); 138 prompt_->SetPermissionsDetails(details,
139 ExtensionInstallPrompt::REGULAR_PERMISSIONS);
138 } 140 }
139 141
140 void ExtensionInstallDialogViewTestBase::SetPromptRetainedFiles( 142 void ExtensionInstallDialogViewTestBase::SetPromptRetainedFiles(
141 std::vector<base::FilePath> files) { 143 std::vector<base::FilePath> files) {
142 prompt_->set_retained_files(files); 144 prompt_->set_retained_files(files);
143 } 145 }
144 146
145 class ScrollbarTest : public ExtensionInstallDialogViewTestBase { 147 class ScrollbarTest : public ExtensionInstallDialogViewTestBase {
146 protected: 148 protected:
147 ScrollbarTest(); 149 ScrollbarTest();
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // proceed or cancel. 254 // proceed or cancel.
253 MockExtensionInstallPromptDelegate delegate; 255 MockExtensionInstallPromptDelegate delegate;
254 scoped_ptr<ExtensionInstallDialogView> dialog( 256 scoped_ptr<ExtensionInstallDialogView> dialog(
255 new ExtensionInstallDialogView(web_contents(), &delegate, prompt())); 257 new ExtensionInstallDialogView(web_contents(), &delegate, prompt()));
256 dialog.reset(); 258 dialog.reset();
257 259
258 EXPECT_EQ(1, delegate.abort_count()); 260 EXPECT_EQ(1, delegate.abort_count());
259 EXPECT_EQ(0, delegate.proceed_count()); 261 EXPECT_EQ(0, delegate.proceed_count());
260 } 262 }
261 } 263 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_install_dialog_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698