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

Side by Side Diff: chrome/browser/extensions/extension_apitest.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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
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 "chrome/browser/extensions/extension_apitest.h" 5 #include "chrome/browser/extensions/extension_apitest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 "Relative page_url given with no extension_name"; 333 "Relative page_url given with no extension_name";
334 334
335 url = extension->GetResourceURL(page_url); 335 url = extension->GetResourceURL(page_url);
336 } 336 }
337 337
338 if (use_incognito) 338 if (use_incognito)
339 OpenURLOffTheRecord(browser()->profile(), url); 339 OpenURLOffTheRecord(browser()->profile(), url);
340 else 340 else
341 ui_test_utils::NavigateToURL(browser(), url); 341 ui_test_utils::NavigateToURL(browser(), url);
342 } else if (launch_platform_app) { 342 } else if (launch_platform_app) {
343 AppLaunchParams params(browser()->profile(), extension, 343 AppLaunchParams params(
344 extensions::LAUNCH_CONTAINER_NONE, NEW_WINDOW, 344 browser()->profile(), extension, extensions::LAUNCH_CONTAINER_NONE,
345 extensions::SOURCE_TEST); 345 WindowOpenDisposition::NEW_WINDOW, extensions::SOURCE_TEST);
346 params.command_line = *base::CommandLine::ForCurrentProcess(); 346 params.command_line = *base::CommandLine::ForCurrentProcess();
347 OpenApplication(params); 347 OpenApplication(params);
348 } 348 }
349 349
350 if (!catcher.GetNextResult()) { 350 if (!catcher.GetNextResult()) {
351 message_ = catcher.message(); 351 message_ = catcher.message();
352 return false; 352 return false;
353 } 353 }
354 354
355 return true; 355 return true;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 } 431 }
432 432
433 void ExtensionApiTest::SetUpCommandLine(base::CommandLine* command_line) { 433 void ExtensionApiTest::SetUpCommandLine(base::CommandLine* command_line) {
434 ExtensionBrowserTest::SetUpCommandLine(command_line); 434 ExtensionBrowserTest::SetUpCommandLine(command_line);
435 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); 435 test_data_dir_ = test_data_dir_.AppendASCII("api_test");
436 // Backgrounded renderer processes run at a lower priority, causing the 436 // Backgrounded renderer processes run at a lower priority, causing the
437 // tests to take more time to complete. Disable backgrounding so that the 437 // tests to take more time to complete. Disable backgrounding so that the
438 // tests don't time out. 438 // tests don't time out.
439 command_line->AppendSwitch(switches::kDisableRendererBackgrounding); 439 command_line->AppendSwitch(switches::kDisableRendererBackgrounding);
440 } 440 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer_browsertest.cc ('k') | chrome/browser/extensions/extension_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698