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

Side by Side Diff: chrome/browser/chromeos/file_manager/file_manager_browsertest.cc

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 years, 7 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // Browser test for basic Chrome OS file manager functionality: 5 // Browser test for basic Chrome OS file manager functionality:
6 // - The file list is updated when a file is added externally to the Downloads 6 // - The file list is updated when a file is added externally to the Downloads
7 // folder. 7 // folder.
8 // - Selecting a file and copy-pasting it with the keyboard copies the file. 8 // - Selecting a file and copy-pasting it with the keyboard copies the file.
9 // - Selecting a file and pressing delete deletes it. 9 // - Selecting a file and pressing delete deletes it.
10 10
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 #define MAYBE_Traverse Traverse 1033 #define MAYBE_Traverse Traverse
1034 #endif 1034 #endif
1035 WRAPPED_INSTANTIATE_TEST_CASE_P( 1035 WRAPPED_INSTANTIATE_TEST_CASE_P(
1036 MAYBE_Traverse, 1036 MAYBE_Traverse,
1037 FileManagerBrowserTest, 1037 FileManagerBrowserTest,
1038 ::testing::Values(TestParameter(IN_GUEST_MODE, "traverseDownloads"), 1038 ::testing::Values(TestParameter(IN_GUEST_MODE, "traverseDownloads"),
1039 TestParameter(NOT_IN_GUEST_MODE, "traverseDownloads"), 1039 TestParameter(NOT_IN_GUEST_MODE, "traverseDownloads"),
1040 TestParameter(NOT_IN_GUEST_MODE, "traverseDrive"))); 1040 TestParameter(NOT_IN_GUEST_MODE, "traverseDrive")));
1041 1041
1042 // Slow tests are disabled on debug build. http://crbug.com/327719 1042 // Slow tests are disabled on debug build. http://crbug.com/327719
1043 // Disabled under MSAN, ASAN, and LSAN as well. http://crbug.com/479757. 1043 // Disabled under MSAN as well. http://crbug.com/468980.
1044 // Flakes often: http://crbug.com/479757 1044 #if !defined(NDEBUG) || defined(MEMORY_SANITIZER)
1045 #define MAYBE_SuggestAppDialog DISABLED_SuggestAppDialog
1046 #else
1047 #define MAYBE_SuggestAppDialog SuggestAppDialog
1048 #endif
1045 WRAPPED_INSTANTIATE_TEST_CASE_P( 1049 WRAPPED_INSTANTIATE_TEST_CASE_P(
1046 DISABLED_SuggestAppDialog, 1050 MAYBE_SuggestAppDialog,
1047 FileManagerBrowserTest, 1051 FileManagerBrowserTest,
1048 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "suggestAppDialog"))); 1052 ::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "suggestAppDialog")));
1049 1053
1050 // Slow tests are disabled on debug build. http://crbug.com/327719 1054 // Slow tests are disabled on debug build. http://crbug.com/327719
1051 // Disabled under MSAN as well. http://crbug.com/468980. 1055 // Disabled under MSAN as well. http://crbug.com/468980.
1052 #if !defined(NDEBUG) || defined(MEMORY_SANITIZER) 1056 #if !defined(NDEBUG) || defined(MEMORY_SANITIZER)
1053 #define MAYBE_ExecuteDefaultTaskOnDownloads \ 1057 #define MAYBE_ExecuteDefaultTaskOnDownloads \
1054 DISABLED_ExecuteDefaultTaskOnDownloads 1058 DISABLED_ExecuteDefaultTaskOnDownloads
1055 #else 1059 #else
1056 #define MAYBE_ExecuteDefaultTaskOnDownloads ExecuteDefaultTaskOnDownloads 1060 #define MAYBE_ExecuteDefaultTaskOnDownloads ExecuteDefaultTaskOnDownloads
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 AddAllUsers(); 1352 AddAllUsers();
1349 1353
1350 // Sanity check that normal operations work in multi-profile setting as well. 1354 // Sanity check that normal operations work in multi-profile setting as well.
1351 set_test_case_name("keyboardCopyDrive"); 1355 set_test_case_name("keyboardCopyDrive");
1352 StartTest(); 1356 StartTest();
1353 } 1357 }
1354 1358
1355 template<GuestMode M> 1359 template<GuestMode M>
1356 class GalleryBrowserTestBase : public FileManagerBrowserTestBase { 1360 class GalleryBrowserTestBase : public FileManagerBrowserTestBase {
1357 public: 1361 public:
1358 virtual GuestMode GetGuestModeParam() const override { return M; } 1362 GuestMode GetGuestModeParam() const override { return M; }
1359 virtual const char* GetTestCaseNameParam() const override { 1363 const char* GetTestCaseNameParam() const override {
1360 return test_case_name_.c_str(); 1364 return test_case_name_.c_str();
1361 } 1365 }
1362 1366
1363 protected: 1367 protected:
1364 virtual const char* GetTestManifestName() const override { 1368 const char* GetTestManifestName() const override {
1365 return "gallery_test_manifest.json"; 1369 return "gallery_test_manifest.json";
1366 } 1370 }
1367 1371
1368 void set_test_case_name(const std::string& name) { 1372 void set_test_case_name(const std::string& name) {
1369 test_case_name_ = name; 1373 test_case_name_ = name;
1370 } 1374 }
1371 1375
1372 private: 1376 private:
1373 base::ListValue scripts_; 1377 base::ListValue scripts_;
1374 std::string test_case_name_; 1378 std::string test_case_name_;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1501 } 1505 }
1502 1506
1503 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, ExposureImageOnDrive) { 1507 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, ExposureImageOnDrive) {
1504 set_test_case_name("exposureImageOnDrive"); 1508 set_test_case_name("exposureImageOnDrive");
1505 StartTest(); 1509 StartTest();
1506 } 1510 }
1507 1511
1508 template<GuestMode M> 1512 template<GuestMode M>
1509 class VideoPlayerBrowserTestBase : public FileManagerBrowserTestBase { 1513 class VideoPlayerBrowserTestBase : public FileManagerBrowserTestBase {
1510 public: 1514 public:
1511 virtual GuestMode GetGuestModeParam() const override { return M; } 1515 GuestMode GetGuestModeParam() const override { return M; }
1512 virtual const char* GetTestCaseNameParam() const override { 1516 const char* GetTestCaseNameParam() const override {
1513 return test_case_name_.c_str(); 1517 return test_case_name_.c_str();
1514 } 1518 }
1515 1519
1516 protected: 1520 protected:
1517 virtual void SetUpCommandLine(base::CommandLine* command_line) override { 1521 void SetUpCommandLine(base::CommandLine* command_line) override {
1518 command_line->AppendSwitch( 1522 command_line->AppendSwitch(
1519 chromeos::switches::kEnableVideoPlayerChromecastSupport); 1523 chromeos::switches::kEnableVideoPlayerChromecastSupport);
1520 FileManagerBrowserTestBase::SetUpCommandLine(command_line); 1524 FileManagerBrowserTestBase::SetUpCommandLine(command_line);
1521 } 1525 }
1522 1526
1523 virtual const char* GetTestManifestName() const override { 1527 const char* GetTestManifestName() const override {
1524 return "video_player_test_manifest.json"; 1528 return "video_player_test_manifest.json";
1525 } 1529 }
1526 1530
1527 void set_test_case_name(const std::string& name) { 1531 void set_test_case_name(const std::string& name) {
1528 test_case_name_ = name; 1532 test_case_name_ = name;
1529 } 1533 }
1530 1534
1531 private: 1535 private:
1532 std::string test_case_name_; 1536 std::string test_case_name_;
1533 }; 1537 };
1534 1538
1535 typedef VideoPlayerBrowserTestBase<NOT_IN_GUEST_MODE> VideoPlayerBrowserTest; 1539 typedef VideoPlayerBrowserTestBase<NOT_IN_GUEST_MODE> VideoPlayerBrowserTest;
1536 typedef VideoPlayerBrowserTestBase<IN_GUEST_MODE> 1540 typedef VideoPlayerBrowserTestBase<IN_GUEST_MODE>
1537 VideoPlayerBrowserTestInGuestMode; 1541 VideoPlayerBrowserTestInGuestMode;
1538 1542
1539 IN_PROC_BROWSER_TEST_F(VideoPlayerBrowserTest, OpenSingleVideoOnDownloads) { 1543 IN_PROC_BROWSER_TEST_F(VideoPlayerBrowserTest, OpenSingleVideoOnDownloads) {
1540 set_test_case_name("openSingleVideoOnDownloads"); 1544 set_test_case_name("openSingleVideoOnDownloads");
1541 StartTest(); 1545 StartTest();
1542 } 1546 }
1543 1547
1544 IN_PROC_BROWSER_TEST_F(VideoPlayerBrowserTest, OpenSingleVideoOnDrive) { 1548 IN_PROC_BROWSER_TEST_F(VideoPlayerBrowserTest, OpenSingleVideoOnDrive) {
1545 set_test_case_name("openSingleVideoOnDrive"); 1549 set_test_case_name("openSingleVideoOnDrive");
1546 StartTest(); 1550 StartTest();
1547 } 1551 }
1548 1552
1549 } // namespace 1553 } // namespace
1550 } // namespace file_manager 1554 } // namespace file_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698