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

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

Issue 105193002: Replace string16 with base::string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(base::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 base::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(
92 pass ? "plugin_not_found" : "OK")); 92 pass ? "plugin_not_found" : "OK"));
93 ui_test_utils::NavigateToURL(window, url); 93 ui_test_utils::NavigateToURL(window, url);
94 ASSERT_EQ(expected_title, title_watcher.WaitAndGetTitle()); 94 ASSERT_EQ(expected_title, title_watcher.WaitAndGetTitle());
95 } 95 }
96 96
97 static void CrashFlash() { 97 static void CrashFlash() {
98 scoped_refptr<content::MessageLoopRunner> runner = 98 scoped_refptr<content::MessageLoopRunner> runner =
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 std::vector<content::WebPluginInfo> plugins = GetPlugins(); 255 std::vector<content::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_content_browser_client.cc ('k') | chrome/browser/chrome_process_finder_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698