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

Unified Diff: chrome/browser/ui/webui/mediaplayer_browsertest.cc

Issue 7067020: Moving mediaplayer to the chrome filebrowser. Observable behaviour should not change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Playlist doesn't reset pending playback request. Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_factory.cc ('k') | chrome/browser/ui/webui/mediaplayer_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/mediaplayer_browsertest.cc
diff --git a/chrome/browser/ui/webui/mediaplayer_browsertest.cc b/chrome/browser/ui/webui/mediaplayer_browsertest.cc
deleted file mode 100644
index 2bd67e4cab0865bd558ee5151976e7abaf2c866c..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/webui/mediaplayer_browsertest.cc
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/command_line.h"
-#include "base/memory/ref_counted.h"
-#include "base/utf_string_conversions.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_list.h"
-#include "chrome/browser/ui/webui/mediaplayer_ui.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/common/url_constants.h"
-#include "chrome/test/automation/dom_element_proxy.h"
-#include "chrome/test/in_process_browser_test.h"
-#include "chrome/test/ui_test_utils.h"
-#include "content/browser/tab_contents/tab_contents.h"
-
-namespace {
-
-class MediaPlayerBrowserTest : public InProcessBrowserTest {
- public:
- MediaPlayerBrowserTest() {}
-
- GURL GetMusicTestURL() {
- return GURL("http://localhost:1337/files/plugin/sample_mp3.mp3");
- }
-
- bool IsPlayerVisible() {
- for (BrowserList::const_iterator it = BrowserList::begin();
- it != BrowserList::end(); ++it) {
- if ((*it)->is_type_panel() && (*it)->is_app()) {
- const GURL& url =
- (*it)->GetTabContentsAt((*it)->active_index())->GetURL();
-
- if (url.SchemeIs(chrome::kChromeUIScheme) &&
- url.host() == chrome::kChromeUIMediaplayerHost) {
- return true;
- }
- }
- }
- return false;
- }
-
- bool IsPlaylistVisible() {
- for (BrowserList::const_iterator it = BrowserList::begin();
- it != BrowserList::end(); ++it) {
- if ((*it)->is_type_panel() && (*it)->is_app()) {
- const GURL& url =
- (*it)->GetTabContentsAt((*it)->active_index())->GetURL();
-
- if (url.SchemeIs(chrome::kChromeUIScheme) &&
- url.host() == chrome::kChromeUIMediaplayerHost &&
- url.ref() == "playlist") {
- return true;
- }
- }
- }
- return false;
- }
-};
-
-IN_PROC_BROWSER_TEST_F(MediaPlayerBrowserTest, Popup) {
- ASSERT_TRUE(test_server()->Start());
- // Doing this so we have a valid profile.
- ui_test_utils::NavigateToURL(browser(),
- GURL("chrome://downloads"));
-
- MediaPlayer* player = MediaPlayer::GetInstance();
- // Check that its not currently visible
- ASSERT_FALSE(IsPlayerVisible());
-
- player->EnqueueMediaFileUrl(GetMusicTestURL(), NULL);
-
- ASSERT_TRUE(IsPlayerVisible());
-}
-
-IN_PROC_BROWSER_TEST_F(MediaPlayerBrowserTest, PopupPlaylist) {
- ASSERT_TRUE(test_server()->Start());
- // Doing this so we have a valid profile.
- ui_test_utils::NavigateToURL(browser(),
- GURL("chrome://downloads"));
-
-
- MediaPlayer* player = MediaPlayer::GetInstance();
-
- player->EnqueueMediaFileUrl(GetMusicTestURL(), NULL);
-
- EXPECT_FALSE(IsPlaylistVisible());
-
- player->TogglePlaylistWindowVisible();
-
- EXPECT_TRUE(IsPlaylistVisible());
-}
-
-} // namespace
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_factory.cc ('k') | chrome/browser/ui/webui/mediaplayer_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698