Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / chromeos / file_manager / video_player_browsertest.cc
blob34b0c1d8a84049c6ec82d6bdfc3b6ebdff8cc812
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/file_manager/file_manager_browsertest_base.h"
7 #include "chromeos/chromeos_switches.h"
9 namespace file_manager {
11 template <GuestMode M>
12 class VideoPlayerBrowserTestBase : public FileManagerBrowserTestBase {
13 public:
14 GuestMode GetGuestModeParam() const override { return M; }
15 const char* GetTestCaseNameParam() const override {
16 return test_case_name_.c_str();
19 protected:
20 void SetUpCommandLine(base::CommandLine* command_line) override {
21 command_line->AppendSwitch(
22 chromeos::switches::kEnableVideoPlayerChromecastSupport);
23 FileManagerBrowserTestBase::SetUpCommandLine(command_line);
26 const char* GetTestManifestName() const override {
27 return "video_player_test_manifest.json";
30 void set_test_case_name(const std::string& name) { test_case_name_ = name; }
32 private:
33 std::string test_case_name_;
36 typedef VideoPlayerBrowserTestBase<NOT_IN_GUEST_MODE> VideoPlayerBrowserTest;
37 typedef VideoPlayerBrowserTestBase<IN_GUEST_MODE>
38 VideoPlayerBrowserTestInGuestMode;
40 IN_PROC_BROWSER_TEST_F(VideoPlayerBrowserTest, OpenSingleVideoOnDownloads) {
41 set_test_case_name("openSingleVideoOnDownloads");
42 StartTest();
45 // http://crbug.com/508949
46 #if defined(MEMORY_SANITIZER)
47 #define MAYBE_OpenSingleVideoOnDownloads DISABLED_OpenSingleVideoOnDownloads
48 #else
49 #define MAYBE_OpenSingleVideoOnDownloads OpenSingleVideoOnDownloads
50 #endif
51 IN_PROC_BROWSER_TEST_F(VideoPlayerBrowserTestInGuestMode,
52 MAYBE_OpenSingleVideoOnDownloads) {
53 set_test_case_name("openSingleVideoOnDownloads");
54 StartTest();
57 // http://crbug.com/508949
58 #if defined(MEMORY_SANITIZER)
59 #define MAYBE_OpenSingleVideoOnDrive DISABLED_OpenSingleVideoOnDrive
60 #else
61 #define MAYBE_OpenSingleVideoOnDrive OpenSingleVideoOnDrive
62 #endif
63 IN_PROC_BROWSER_TEST_F(VideoPlayerBrowserTest, MAYBE_OpenSingleVideoOnDrive) {
64 set_test_case_name("openSingleVideoOnDrive");
65 StartTest();
68 // http://crbug.com/508949
69 #if defined(MEMORY_SANITIZER)
70 #define MAYBE_CheckInitialElements DISABLED_CheckInitialElements
71 #else
72 #define MAYBE_CheckInitialElements CheckInitialElements
73 #endif
74 IN_PROC_BROWSER_TEST_F(VideoPlayerBrowserTest, MAYBE_CheckInitialElements) {
75 set_test_case_name("checkInitialElements");
76 StartTest();
79 } // namespace file_manager