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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh 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
« no previous file with comments | « content/browser/webui/web_ui_data_source_unittest.cc ('k') | content/gpu/gpu_info_collector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) {
303 RunTest("single_worker.html", ""); 303 RunTest("single_worker.html", std::string());
304 } 304 }
305 305
306 IN_PROC_BROWSER_TEST_F(WorkerTest, MultipleWorkers) { 306 IN_PROC_BROWSER_TEST_F(WorkerTest, MultipleWorkers) {
307 RunTest("multi_worker.html", ""); 307 RunTest("multi_worker.html", std::string());
308 } 308 }
309 309
310 IN_PROC_BROWSER_TEST_F(WorkerTest, SingleSharedWorker) { 310 IN_PROC_BROWSER_TEST_F(WorkerTest, SingleSharedWorker) {
311 RunTest("single_worker.html", "shared=true"); 311 RunTest("single_worker.html", "shared=true");
312 } 312 }
313 313
314 // http://crbug.com/96435 314 // http://crbug.com/96435
315 IN_PROC_BROWSER_TEST_F(WorkerTest, MultipleSharedWorkers) { 315 IN_PROC_BROWSER_TEST_F(WorkerTest, MultipleSharedWorkers) {
316 RunTest("multi_worker.html", "shared=true"); 316 RunTest("multi_worker.html", "shared=true");
317 } 317 }
318 318
319 // Incognito windows should not share workers with non-incognito windows 319 // Incognito windows should not share workers with non-incognito windows
320 // http://crbug.com/30021 320 // http://crbug.com/30021
321 IN_PROC_BROWSER_TEST_F(WorkerTest, IncognitoSharedWorkers) { 321 IN_PROC_BROWSER_TEST_F(WorkerTest, IncognitoSharedWorkers) {
322 // Load a non-incognito tab and have it create a shared worker 322 // Load a non-incognito tab and have it create a shared worker
323 RunTest("incognito_worker.html", ""); 323 RunTest("incognito_worker.html", std::string());
324 324
325 // Incognito worker should not share with non-incognito 325 // Incognito worker should not share with non-incognito
326 RunTest(CreateOffTheRecordBrowser(), "incognito_worker.html", ""); 326 RunTest(CreateOffTheRecordBrowser(), "incognito_worker.html", std::string());
327 } 327 }
328 328
329 // Make sure that auth dialog is displayed from worker context. 329 // Make sure that auth dialog is displayed from worker context.
330 // http://crbug.com/33344 330 // http://crbug.com/33344
331 IN_PROC_BROWSER_TEST_F(WorkerTest, WorkerHttpAuth) { 331 IN_PROC_BROWSER_TEST_F(WorkerTest, WorkerHttpAuth) {
332 ASSERT_TRUE(test_server()->Start()); 332 ASSERT_TRUE(test_server()->Start());
333 GURL url = test_server()->GetURL("files/workers/worker_auth.html"); 333 GURL url = test_server()->GetURL("files/workers/worker_auth.html");
334 334
335 NavigateAndWaitForAuth(url); 335 NavigateAndWaitForAuth(url);
336 } 336 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 392
393 // Now close a page and check that the queued workers were started. 393 // Now close a page and check that the queued workers were started.
394 url = GURL(GetTestUrl("google", "google.html")); 394 url = GURL(GetTestUrl("google", "google.html"));
395 NavigateToURL(shell(), url); 395 NavigateToURL(shell(), url);
396 396
397 ASSERT_TRUE(WaitForWorkerProcessCount(total_workers)); 397 ASSERT_TRUE(WaitForWorkerProcessCount(total_workers));
398 } 398 }
399 399
400 // Flaky, http://crbug.com/59786. 400 // Flaky, http://crbug.com/59786.
401 IN_PROC_BROWSER_TEST_F(WorkerTest, WorkerClose) { 401 IN_PROC_BROWSER_TEST_F(WorkerTest, WorkerClose) {
402 RunTest("worker_close.html", ""); 402 RunTest("worker_close.html", std::string());
403 ASSERT_TRUE(WaitForWorkerProcessCount(0)); 403 ASSERT_TRUE(WaitForWorkerProcessCount(0));
404 } 404 }
405 405
406 // Flaky, http://crbug.com/70861. 406 // Flaky, http://crbug.com/70861.
407 // Times out regularly on Windows debug bots. See http://crbug.com/212339 . 407 // Times out regularly on Windows debug bots. See http://crbug.com/212339 .
408 #if defined(OS_WIN) && !defined(NDEBUG) 408 #if defined(OS_WIN) && !defined(NDEBUG)
409 #define MAYBE_QueuedSharedWorkerShutdown DISABLED_QueuedSharedWorkerShutdown 409 #define MAYBE_QueuedSharedWorkerShutdown DISABLED_QueuedSharedWorkerShutdown
410 #else 410 #else
411 #define MAYBE_QueuedSharedWorkerShutdown QueuedSharedWorkerShutdown 411 #define MAYBE_QueuedSharedWorkerShutdown QueuedSharedWorkerShutdown
412 #endif 412 #endif
(...skipping 68 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/gpu/gpu_info_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698