summaryrefslogtreecommitdiffstats
path: root/chrome/test/nacl
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-11 04:08:40 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-11 04:08:40 +0000
commit152ea305aa6528244310077cac67afc8df71bb5a (patch)
treec835ca1bd19a49492aaa8959ef8242c28d072f65 /chrome/test/nacl
parent2074e5e82dee830ce07695cd71a1fe04d782f924 (diff)
downloadchromium_src-152ea305aa6528244310077cac67afc8df71bb5a.zip
chromium_src-152ea305aa6528244310077cac67afc8df71bb5a.tar.gz
chromium_src-152ea305aa6528244310077cac67afc8df71bb5a.tar.bz2
Move FilePath->base::FilePath
Review URL: https://codereview.chromium.org/12213104 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181663 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/nacl')
-rw-r--r--chrome/test/nacl/nacl_browsertest_util.cc32
-rw-r--r--chrome/test/nacl/nacl_browsertest_util.h20
2 files changed, 27 insertions, 25 deletions
diff --git a/chrome/test/nacl/nacl_browsertest_util.cc b/chrome/test/nacl/nacl_browsertest_util.cc
index 1474b55..14ce396 100644
--- a/chrome/test/nacl/nacl_browsertest_util.cc
+++ b/chrome/test/nacl/nacl_browsertest_util.cc
@@ -168,8 +168,8 @@ MessageResponse NaClIntegrationMessageHandler::HandleStructuredMessage(
// nacl_test_data/
// newlib/
// glibc/
-static bool GetNaClVariantRoot(const FilePath::StringType& variant,
- FilePath* document_root) {
+static bool GetNaClVariantRoot(const base::FilePath::StringType& variant,
+ base::FilePath* document_root) {
if (!ui_test_utils::GetRelativeBuildDirectory(document_root))
return false;
*document_root = document_root->Append(FILE_PATH_LITERAL("nacl_test_data"));
@@ -190,14 +190,14 @@ void NaClBrowserTestBase::SetUpCommandLine(CommandLine* command_line) {
void NaClBrowserTestBase::SetUpInProcessBrowserTestFixture() {
// Sanity check.
- FilePath plugin_lib;
+ base::FilePath plugin_lib;
ASSERT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib));
ASSERT_TRUE(file_util::PathExists(plugin_lib)) << plugin_lib.value();
ASSERT_TRUE(StartTestServer()) << "Cannot start test server.";
}
-bool NaClBrowserTestBase::GetDocumentRoot(FilePath* document_root) {
+bool NaClBrowserTestBase::GetDocumentRoot(base::FilePath* document_root) {
return GetNaClVariantRoot(Variant(), document_root);
}
@@ -205,8 +205,9 @@ bool NaClBrowserTestBase::IsPnacl() {
return false;
}
-GURL NaClBrowserTestBase::TestURL(const FilePath::StringType& url_fragment) {
- FilePath expanded_url = FilePath(FILE_PATH_LITERAL("files"));
+GURL NaClBrowserTestBase::TestURL(
+ const base::FilePath::StringType& url_fragment) {
+ base::FilePath expanded_url = base::FilePath(FILE_PATH_LITERAL("files"));
expanded_url = expanded_url.Append(url_fragment);
return test_server_->GetURL(expanded_url.MaybeAsASCII());
}
@@ -220,7 +221,8 @@ bool NaClBrowserTestBase::RunJavascriptTest(const GURL& url,
return observer.Run();
}
-void NaClBrowserTestBase::RunLoadTest(const FilePath::StringType& test_file) {
+void NaClBrowserTestBase::RunLoadTest(
+ const base::FilePath::StringType& test_file) {
LoadTestMessageHandler handler;
bool ok = RunJavascriptTest(TestURL(test_file), &handler);
ASSERT_TRUE(ok) << handler.error_message();
@@ -228,7 +230,7 @@ void NaClBrowserTestBase::RunLoadTest(const FilePath::StringType& test_file) {
}
void NaClBrowserTestBase::RunNaClIntegrationTest(
- const FilePath::StringType& url_fragment) {
+ const base::FilePath::StringType& url_fragment) {
NaClIntegrationMessageHandler handler;
bool ok = RunJavascriptTest(TestURL(url_fragment), &handler);
ASSERT_TRUE(ok) << handler.error_message();
@@ -237,7 +239,7 @@ void NaClBrowserTestBase::RunNaClIntegrationTest(
bool NaClBrowserTestBase::StartTestServer() {
// Launch the web server.
- FilePath document_root;
+ base::FilePath document_root;
if (!GetDocumentRoot(&document_root))
return false;
test_server_.reset(new net::TestServer(net::TestServer::TYPE_HTTP,
@@ -246,15 +248,15 @@ bool NaClBrowserTestBase::StartTestServer() {
return test_server_->Start();
}
-FilePath::StringType NaClBrowserTestNewlib::Variant() {
+base::FilePath::StringType NaClBrowserTestNewlib::Variant() {
return FILE_PATH_LITERAL("newlib");
}
-FilePath::StringType NaClBrowserTestGLibc::Variant() {
+base::FilePath::StringType NaClBrowserTestGLibc::Variant() {
return FILE_PATH_LITERAL("glibc");
}
-FilePath::StringType NaClBrowserTestPnacl::Variant() {
+base::FilePath::StringType NaClBrowserTestPnacl::Variant() {
return FILE_PATH_LITERAL("pnacl");
}
@@ -267,11 +269,11 @@ void NaClBrowserTestPnacl::SetUpCommandLine(CommandLine* command_line) {
command_line->AppendSwitch(switches::kEnablePnacl);
}
-FilePath::StringType NaClBrowserTestStatic::Variant() {
+base::FilePath::StringType NaClBrowserTestStatic::Variant() {
return FILE_PATH_LITERAL("static");
}
-bool NaClBrowserTestStatic::GetDocumentRoot(FilePath* document_root) {
- *document_root = FilePath(FILE_PATH_LITERAL("chrome/test/data/nacl"));
+bool NaClBrowserTestStatic::GetDocumentRoot(base::FilePath* document_root) {
+ *document_root = base::FilePath(FILE_PATH_LITERAL("chrome/test/data/nacl"));
return true;
}
diff --git a/chrome/test/nacl/nacl_browsertest_util.h b/chrome/test/nacl/nacl_browsertest_util.h
index 546ceec..3a4c04a 100644
--- a/chrome/test/nacl/nacl_browsertest_util.h
+++ b/chrome/test/nacl/nacl_browsertest_util.h
@@ -69,16 +69,16 @@ class NaClBrowserTestBase : public InProcessBrowserTest {
// What variant are we running - newlib, glibc, pnacl, etc?
// This is used to compute what directory we're pulling data from, but it can
// also be used to affect the behavior of the test.
- virtual FilePath::StringType Variant() = 0;
+ virtual base::FilePath::StringType Variant() = 0;
// Where are the files for this class of test located on disk?
- virtual bool GetDocumentRoot(FilePath* document_root);
+ virtual bool GetDocumentRoot(base::FilePath* document_root);
virtual bool IsPnacl();
// Map a file relative to the variant directory to a URL served by the test
// web server.
- GURL TestURL(const FilePath::StringType& url_fragment);
+ GURL TestURL(const base::FilePath::StringType& url_fragment);
// Load a URL and listen to automation events with a given handler.
// Returns true if the test glue function correctly. (The handler should
@@ -87,7 +87,7 @@ class NaClBrowserTestBase : public InProcessBrowserTest {
// Run a simple test that checks that a nexe loads correctly. Useful for
// setting up other tests, such as checking that UMA data was logged.
- void RunLoadTest(const FilePath::StringType& test_file);
+ void RunLoadTest(const base::FilePath::StringType& test_file);
// Run a test that was originally written to use NaCl's integration testing
// jig. These tests were originally driven by NaCl's SCons build in the
@@ -96,7 +96,7 @@ class NaClBrowserTestBase : public InProcessBrowserTest {
// these tests having a stronger affinity with the Chrome repo. This method
// provides a compatibility layer to simplify turning nacl_integration tests
// into browser tests.
- void RunNaClIntegrationTest(const FilePath::StringType& url_fragment);
+ void RunNaClIntegrationTest(const base::FilePath::StringType& url_fragment);
private:
bool StartTestServer();
@@ -106,19 +106,19 @@ class NaClBrowserTestBase : public InProcessBrowserTest {
class NaClBrowserTestNewlib : public NaClBrowserTestBase {
public:
- virtual FilePath::StringType Variant() OVERRIDE;
+ virtual base::FilePath::StringType Variant() OVERRIDE;
};
class NaClBrowserTestGLibc : public NaClBrowserTestBase {
public:
- virtual FilePath::StringType Variant() OVERRIDE;
+ virtual base::FilePath::StringType Variant() OVERRIDE;
};
class NaClBrowserTestPnacl : public NaClBrowserTestBase {
public:
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE;
- virtual FilePath::StringType Variant() OVERRIDE;
+ virtual base::FilePath::StringType Variant() OVERRIDE;
virtual bool IsPnacl() OVERRIDE;
};
@@ -126,8 +126,8 @@ class NaClBrowserTestPnacl : public NaClBrowserTestBase {
// A NaCl browser test only using static files.
class NaClBrowserTestStatic : public NaClBrowserTestBase {
public:
- virtual FilePath::StringType Variant() OVERRIDE;
- virtual bool GetDocumentRoot(FilePath* document_root) OVERRIDE;
+ virtual base::FilePath::StringType Variant() OVERRIDE;
+ virtual bool GetDocumentRoot(base::FilePath* document_root) OVERRIDE;
};
#if defined(ARCH_CPU_ARM_FAMILY)