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

Side by Side Diff: content/browser/worker_host/test/worker_browsertest.cc

Issue 13409003: Hide ContentClient getters from embedders so that they they don't reuse content's embedder API. The… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 8 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 EXPECT_EQ(cur_process_count, count); 282 EXPECT_EQ(cur_process_count, count);
283 return false; 283 return false;
284 } 284 }
285 285
286 static void QuitUIMessageLoop(base::Callback<void()> callback) { 286 static void QuitUIMessageLoop(base::Callback<void()> callback) {
287 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, callback); 287 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, callback);
288 } 288 }
289 289
290 void NavigateAndWaitForAuth(const GURL& url) { 290 void NavigateAndWaitForAuth(const GURL& url) {
291 ShellContentBrowserClient* browser_client = 291 ShellContentBrowserClient* browser_client =
292 static_cast<ShellContentBrowserClient*>(GetContentClient()->browser()); 292 ShellContentBrowserClient::Get();
293 scoped_refptr<MessageLoopRunner> runner = new MessageLoopRunner(); 293 scoped_refptr<MessageLoopRunner> runner = new MessageLoopRunner();
294 browser_client->resource_dispatcher_host_delegate()-> 294 browser_client->resource_dispatcher_host_delegate()->
295 set_login_request_callback( 295 set_login_request_callback(
296 base::Bind(&QuitUIMessageLoop, runner->QuitClosure())); 296 base::Bind(&QuitUIMessageLoop, runner->QuitClosure()));
297 shell()->LoadURL(url); 297 shell()->LoadURL(url);
298 runner->Run(); 298 runner->Run();
299 } 299 }
300 }; 300 };
301 301
302 IN_PROC_BROWSER_TEST_F(WorkerTest, SingleWorker) { 302 IN_PROC_BROWSER_TEST_F(WorkerTest, SingleWorker) {
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 // Run test. 481 // Run test.
482 Shell* window = shell(); 482 Shell* window = shell();
483 const string16 expected_title = ASCIIToUTF16("OK"); 483 const string16 expected_title = ASCIIToUTF16("OK");
484 TitleWatcher title_watcher(window->web_contents(), expected_title); 484 TitleWatcher title_watcher(window->web_contents(), expected_title);
485 NavigateToURL(window, url); 485 NavigateToURL(window, url);
486 string16 final_title = title_watcher.WaitAndGetTitle(); 486 string16 final_title = title_watcher.WaitAndGetTitle();
487 EXPECT_EQ(expected_title, final_title); 487 EXPECT_EQ(expected_title, final_title);
488 } 488 }
489 489
490 } // namespace content 490 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/webui/web_ui_data_source_unittest.cc ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698