BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / chromeos / file_manager / file_manager_jstest_base.cc
blob79d1cbc5266085a34059abbd53fbcc921c303ecc
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/file_manager/file_manager_jstest_base.h"
7 #include <vector>
8 #include "base/path_service.h"
9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
11 #include "chrome/test/base/ui_test_utils.h"
12 #include "content/public/browser/web_contents.h"
13 #include "content/public/test/browser_test_utils.h"
14 #include "net/base/filename_util.h"
16 FileManagerJsTestBase::FileManagerJsTestBase(const base::FilePath& base_path)
17 : base_path_(base_path) {}
19 void FileManagerJsTestBase::RunTest(const base::FilePath& file) {
20 base::FilePath root_path;
21 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &root_path));
23 const GURL url = net::FilePathToFileURL(
24 root_path.Append(base_path_)
25 .Append(file));
26 ui_test_utils::NavigateToURL(browser(), url);
28 content::WebContents* const web_contents =
29 browser()->tab_strip_model()->GetActiveWebContents();
30 ASSERT_TRUE(web_contents);
32 const std::vector<int> empty_libraries;
33 EXPECT_TRUE(ExecuteWebUIResourceTest(web_contents, empty_libraries));