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

Unified Diff: chrome/browser/ui/panels/panel_browsertest.cc

Issue 8568034: Cleanup to move other Panels test data files to new panels test dir. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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: chrome/browser/ui/panels/panel_browsertest.cc
diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc
index ae2d9ef05c0cbf6f90f7387ae6020ab4d2d43802..5f2db43a9e57648d4d3176b58b6199a869a23a14 100644
--- a/chrome/browser/ui/panels/panel_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_browsertest.cc
@@ -844,11 +844,11 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, AutoResize) {
Panel* panel = CreatePanelWithParams(params);
// Load the test page.
- const FilePath::CharType* kUpdateSizeTestFile =
- FILE_PATH_LITERAL("update-preferred-size.html");
- ui_test_utils::NavigateToURL(panel->browser(),
- ui_test_utils::GetTestUrl(FilePath(FilePath::kCurrentDirectory),
- FilePath(kUpdateSizeTestFile)));
+ GURL url(ui_test_utils::GetTestUrl(
+ FilePath(kTestDir),
+ FilePath(FILE_PATH_LITERAL("update-preferred-size.html"))));
+ ui_test_utils::NavigateToURL(panel->browser(), url);
+
gfx::Rect initial_bounds = panel->GetBounds();
EXPECT_LE(100, initial_bounds.width());
EXPECT_LE(100, initial_bounds.height());
@@ -1404,15 +1404,15 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, OnBeforeUnloadOnClose) {
PanelManager* panel_manager = PanelManager::GetInstance();
EXPECT_EQ(0, panel_manager->num_panels()); // No panels initially.
- const char* on_before_unload_html_file = "onbeforeunload.html";
const string16 title_first_close = UTF8ToUTF16("TitleFirstClose");
const string16 title_second_close = UTF8ToUTF16("TitleSecondClose");
// Create a test panel with tab contents loaded.
CreatePanelParams params("PanelTest1", gfx::Rect(0, 0, 300, 300),
SHOW_AS_ACTIVE);
- params.url = GURL(net::FilePathToFileURL(
- test_data_dir_.AppendASCII(on_before_unload_html_file)));
+ params.url = ui_test_utils::GetTestUrl(
+ FilePath(kTestDir),
+ FilePath(FILE_PATH_LITERAL("onbeforeunload.html")));
Panel* panel = CreatePanelWithParams(params);
EXPECT_EQ(1, panel_manager->num_panels());
TabContents* tab_contents = panel->browser()->GetSelectedTabContents();
@@ -1454,7 +1454,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, CreateWithExistingContents) {
// Load contents into regular tabbed browser.
GURL url(ui_test_utils::GetTestUrl(
- FilePath(FilePath::kCurrentDirectory),
+ FilePath(kTestDir),
FilePath(FILE_PATH_LITERAL("update-preferred-size.html"))));
ui_test_utils::NavigateToURL(browser(), url);
EXPECT_EQ(1, browser()->tab_count());
« no previous file with comments | « chrome/browser/ui/panels/base_panel_browser_test.cc ('k') | chrome/test/data/panels/update-preferred-size.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698