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

Side by Side Diff: chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc

Issue 19052005: Move PathIsWritable, DirectoryExists, ContentsEqual, and TextContentsEqual to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 5 #include <vector>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 base::ScopedTempDir temp_dir; 191 base::ScopedTempDir temp_dir;
192 EXPECT_TRUE(temp_dir.CreateUniqueTempDir()); 192 EXPECT_TRUE(temp_dir.CreateUniqueTempDir());
193 base::FilePath missing_directory = temp_dir.Take(); 193 base::FilePath missing_directory = temp_dir.Take();
194 EXPECT_TRUE(base::Delete(missing_directory, true)); 194 EXPECT_TRUE(base::Delete(missing_directory, true));
195 WebstoreInstaller::SetDownloadDirectoryForTests(&missing_directory); 195 WebstoreInstaller::SetDownloadDirectoryForTests(&missing_directory);
196 196
197 // Now run the install test, which should succeed. 197 // Now run the install test, which should succeed.
198 ASSERT_TRUE(RunInstallTest("accepted.html", "extension.crx")); 198 ASSERT_TRUE(RunInstallTest("accepted.html", "extension.crx"));
199 199
200 // Cleanup. 200 // Cleanup.
201 if (file_util::DirectoryExists(missing_directory)) 201 if (base::DirectoryExists(missing_directory))
202 EXPECT_TRUE(base::Delete(missing_directory, true)); 202 EXPECT_TRUE(base::Delete(missing_directory, true));
203 } 203 }
204 204
205 // Tests passing a localized name. 205 // Tests passing a localized name.
206 IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, InstallLocalized) { 206 IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, InstallLocalized) {
207 ASSERT_TRUE(RunInstallTest("localized.html", "localized_extension.crx")); 207 ASSERT_TRUE(RunInstallTest("localized.html", "localized_extension.crx"));
208 } 208 }
209 209
210 // Now test the case where the user cancels the confirmation dialog. 210 // Now test the case where the user cancels the confirmation dialog.
211 IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, InstallCancelled) { 211 IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, InstallCancelled) {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 content::GpuDataManager::GetInstance()->InitializeForTesting( 366 content::GpuDataManager::GetInstance()->InitializeForTesting(
367 json_blacklist, gpu_info); 367 json_blacklist, gpu_info);
368 EXPECT_TRUE(content::GpuDataManager::GetInstance()->IsFeatureBlacklisted( 368 EXPECT_TRUE(content::GpuDataManager::GetInstance()->IsFeatureBlacklisted(
369 gpu::GPU_FEATURE_TYPE_WEBGL)); 369 gpu::GPU_FEATURE_TYPE_WEBGL));
370 370
371 bool webgl_allowed = false; 371 bool webgl_allowed = false;
372 RunTest(webgl_allowed); 372 RunTest(webgl_allowed);
373 } 373 }
374 374
375 } // namespace extensions 375 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/storage/managed_value_store_cache.cc ('k') | chrome/browser/extensions/extension_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698