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

Unified Diff: content/browser/media_browsertest.cc

Issue 10820007: Move all the layout tests that ran under browser_tests to run under content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 5 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
Index: content/browser/media_browsertest.cc
===================================================================
--- content/browser/media_browsertest.cc (revision 148205)
+++ content/browser/media_browsertest.cc (working copy)
@@ -7,21 +7,18 @@
#include "base/stringprintf.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_tabstrip.h"
-#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/browser_test_utils.h"
+#include "content/shell/shell.h"
#include "content/test/layout_browsertest.h"
+#include "content/test/content_browser_test_utils.h"
#include "googleurl/src/gurl.h"
-class MediaTest : public InProcessBrowserTest {
+class MediaTest : public content::ContentBrowserTest {
protected:
GURL GetTestURL(const char* tag, const char* media_file) {
- FilePath test_file_path = ui_test_utils::GetTestFilePath(
- FilePath(FILE_PATH_LITERAL("media")),
- FilePath(FILE_PATH_LITERAL("player.html")));
+ FilePath test_file_path = content::GetTestFilePath("media", "player.html");
std::string query = base::StringPrintf("%s=%s", tag, media_file);
- return ui_test_utils::GetFileUrlWithQuery(test_file_path, query);
+ return content::GetFileUrlWithQuery(test_file_path, query);
}
void PlayMedia(const char* tag, const char* media_file) {
@@ -31,12 +28,11 @@
const string16 kPlaying = ASCIIToUTF16("PLAYING");
const string16 kFailed = ASCIIToUTF16("FAILED");
const string16 kError = ASCIIToUTF16("ERROR");
- content::TitleWatcher title_watcher(
- chrome::GetActiveWebContents(browser()), kPlaying);
+ content::TitleWatcher title_watcher(shell()->web_contents(), kPlaying);
title_watcher.AlsoWaitForTitle(kFailed);
title_watcher.AlsoWaitForTitle(kError);
- ui_test_utils::NavigateToURL(browser(), player_gurl);
+ content::NavigateToURL(shell(), player_gurl);
string16 final_title = title_watcher.WaitAndGetTitle();
EXPECT_EQ(kPlaying, final_title);

Powered by Google App Engine
This is Rietveld 408576698