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

Side by Side Diff: chrome/browser/chrome_plugin_browsertest.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } // namespace 71 } // namespace
72 72
73 class ChromePluginTest : public InProcessBrowserTest { 73 class ChromePluginTest : public InProcessBrowserTest {
74 protected: 74 protected:
75 ChromePluginTest() {} 75 ChromePluginTest() {}
76 76
77 static GURL GetURL(const char* filename) { 77 static GURL GetURL(const char* filename) {
78 base::FilePath path; 78 base::FilePath path;
79 PathService::Get(content::DIR_TEST_DATA, &path); 79 PathService::Get(content::DIR_TEST_DATA, &path);
80 path = path.AppendASCII("plugin").AppendASCII(filename); 80 path = path.AppendASCII("plugin").AppendASCII(filename);
81 CHECK(file_util::PathExists(path)); 81 CHECK(base::PathExists(path));
82 return net::FilePathToFileURL(path); 82 return net::FilePathToFileURL(path);
83 } 83 }
84 84
85 static void LoadAndWait(Browser* window, const GURL& url, bool pass) { 85 static void LoadAndWait(Browser* window, const GURL& url, bool pass) {
86 content::WebContents* web_contents = 86 content::WebContents* web_contents =
87 window->tab_strip_model()->GetActiveWebContents(); 87 window->tab_strip_model()->GetActiveWebContents();
88 string16 expected_title(ASCIIToUTF16(pass ? "OK" : "plugin_not_found")); 88 string16 expected_title(ASCIIToUTF16(pass ? "OK" : "plugin_not_found"));
89 content::TitleWatcher title_watcher(web_contents, expected_title); 89 content::TitleWatcher title_watcher(web_contents, expected_title);
90 title_watcher.AlsoWaitForTitle(ASCIIToUTF16("FAIL")); 90 title_watcher.AlsoWaitForTitle(ASCIIToUTF16("FAIL"));
91 title_watcher.AlsoWaitForTitle(ASCIIToUTF16( 91 title_watcher.AlsoWaitForTitle(ASCIIToUTF16(
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 std::vector<webkit::WebPluginInfo> plugins = GetPlugins(); 255 std::vector<webkit::WebPluginInfo> plugins = GetPlugins();
256 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(expected); ++i) { 256 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(expected); ++i) {
257 size_t j = 0; 257 size_t j = 0;
258 for (; j < plugins.size(); ++j) { 258 for (; j < plugins.size(); ++j) {
259 if (plugins[j].name == ASCIIToUTF16(expected[i])) 259 if (plugins[j].name == ASCIIToUTF16(expected[i]))
260 break; 260 break;
261 } 261 }
262 ASSERT_TRUE(j != plugins.size()) << "Didn't find " << expected[i]; 262 ASSERT_TRUE(j != plugins.size()) << "Didn't find " << expected[i];
263 } 263 }
264 } 264 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/chromeos/app_mode/kiosk_app_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698