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

Unified Diff: content/browser/media_browsertest.cc

Issue 11346016: Move remaining content test code into the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 | « content/browser/fileapi/blob_layout_browsertest.cc ('k') | content/browser/plugin_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media_browsertest.cc
===================================================================
--- content/browser/media_browsertest.cc (revision 164732)
+++ content/browser/media_browsertest.cc (working copy)
@@ -15,13 +15,14 @@
#include "content/test/content_browser_test_utils.h"
#include "googleurl/src/gurl.h"
+namespace content {
+
// Tests playback and seeking of an audio or video file over file or http based
// on a test parameter. Test starts with playback, then, after X seconds or the
// ended event fires, seeks near end of file; see player.html for details. The
// test completes when either the last 'ended' or an 'error' event fires.
-class MediaTest
- : public testing::WithParamInterface<bool>,
- public content::ContentBrowserTest {
+class MediaTest : public testing::WithParamInterface<bool>,
+ public ContentBrowserTest {
public:
// Play specified audio over http:// or file:// depending on |http| setting.
void PlayAudio(const char* media_file, bool http) {
@@ -48,9 +49,9 @@
base::StringPrintf("files/media/player.html?%s=%s", tag, media_file));
}
- FilePath test_file_path = content::GetTestFilePath("media", "player.html");
+ FilePath test_file_path = GetTestFilePath("media", "player.html");
std::string query = base::StringPrintf("%s=%s", tag, media_file);
- return content::GetFileUrlWithQuery(test_file_path, query);
+ return GetFileUrlWithQuery(test_file_path, query);
}
void PlayMedia(const char* tag, const char* media_file, bool http) {
@@ -63,11 +64,11 @@
const string16 kEnded = ASCIIToUTF16("ENDED");
const string16 kError = ASCIIToUTF16("ERROR");
const string16 kFailed = ASCIIToUTF16("FAILED");
- content::TitleWatcher title_watcher(shell()->web_contents(), kEnded);
+ TitleWatcher title_watcher(shell()->web_contents(), kEnded);
title_watcher.AlsoWaitForTitle(kFailed);
title_watcher.AlsoWaitForTitle(kError);
- content::NavigateToURL(shell(), player_gurl);
+ NavigateToURL(shell(), player_gurl);
string16 final_title = title_watcher.WaitAndGetTitle();
EXPECT_EQ(kEnded, final_title);
@@ -192,3 +193,5 @@
IN_PROC_BROWSER_TEST_F(MediaLayoutTest, VideoNoAutoplayTest) {
RunLayoutTest("video-no-autoplay.html");
}
+
+} // namespace content
« no previous file with comments | « content/browser/fileapi/blob_layout_browsertest.cc ('k') | content/browser/plugin_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698