OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/ref_counted.h" | 6 #include "base/ref_counted.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/test/automation/dom_element_proxy.h" | 8 #include "chrome/test/automation/dom_element_proxy.h" |
9 #include "chrome/browser/dom_ui/mediaplayer_ui.h" | 9 #include "chrome/browser/dom_ui/mediaplayer_ui.h" |
10 #include "chrome/browser/tab_contents/tab_contents.h" | 10 #include "chrome/browser/tab_contents/tab_contents.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 return false; | 62 return false; |
63 } | 63 } |
64 }; | 64 }; |
65 | 65 |
66 IN_PROC_BROWSER_TEST_F(MediaPlayerBrowserTest, Popup) { | 66 IN_PROC_BROWSER_TEST_F(MediaPlayerBrowserTest, Popup) { |
67 ASSERT_TRUE(test_server()->Start()); | 67 ASSERT_TRUE(test_server()->Start()); |
68 // Doing this so we have a valid profile. | 68 // Doing this so we have a valid profile. |
69 ui_test_utils::NavigateToURL(browser(), | 69 ui_test_utils::NavigateToURL(browser(), |
70 GURL("chrome://downloads")); | 70 GURL("chrome://downloads")); |
71 | 71 |
72 MediaPlayer* player = MediaPlayer::Get(); | 72 MediaPlayer* player = MediaPlayer::GetInstance(); |
73 // Check that its not currently visible | 73 // Check that its not currently visible |
74 ASSERT_FALSE(IsPlayerVisible()); | 74 ASSERT_FALSE(IsPlayerVisible()); |
75 | 75 |
76 player->EnqueueMediaURL(GetMusicTestURL(), NULL); | 76 player->EnqueueMediaURL(GetMusicTestURL(), NULL); |
77 | 77 |
78 ASSERT_TRUE(IsPlayerVisible()); | 78 ASSERT_TRUE(IsPlayerVisible()); |
79 } | 79 } |
80 | 80 |
81 IN_PROC_BROWSER_TEST_F(MediaPlayerBrowserTest, PopupPlaylist) { | 81 IN_PROC_BROWSER_TEST_F(MediaPlayerBrowserTest, PopupPlaylist) { |
82 ASSERT_TRUE(test_server()->Start()); | 82 ASSERT_TRUE(test_server()->Start()); |
83 // Doing this so we have a valid profile. | 83 // Doing this so we have a valid profile. |
84 ui_test_utils::NavigateToURL(browser(), | 84 ui_test_utils::NavigateToURL(browser(), |
85 GURL("chrome://downloads")); | 85 GURL("chrome://downloads")); |
86 | 86 |
87 | 87 |
88 MediaPlayer* player = MediaPlayer::Get(); | 88 MediaPlayer* player = MediaPlayer::GetInstance(); |
89 | 89 |
90 player->EnqueueMediaURL(GetMusicTestURL(), NULL); | 90 player->EnqueueMediaURL(GetMusicTestURL(), NULL); |
91 | 91 |
92 EXPECT_FALSE(IsPlaylistVisible()); | 92 EXPECT_FALSE(IsPlaylistVisible()); |
93 | 93 |
94 player->TogglePlaylistWindowVisible(); | 94 player->TogglePlaylistWindowVisible(); |
95 | 95 |
96 EXPECT_TRUE(IsPlaylistVisible()); | 96 EXPECT_TRUE(IsPlaylistVisible()); |
97 } | 97 } |
98 | 98 |
99 } // namespace | 99 } // namespace |
OLD | NEW |