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

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

Issue 10824030: Move ExtensionHost into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 years, 4 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_browsertest.h" 5 #include "chrome/browser/extensions/extension_browsertest.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 L"window.addEventListener('unload', function() {" 527 L"window.addEventListener('unload', function() {"
528 L" window.domAutomationController.send(true);" 528 L" window.domAutomationController.send(true);"
529 L"}, false);" 529 L"}, false);"
530 L"window.location = '" + UTF8ToWide(url.spec()) + L"';", 530 L"window.location = '" + UTF8ToWide(url.spec()) + L"';",
531 &result)); 531 &result));
532 ASSERT_TRUE(result); 532 ASSERT_TRUE(result);
533 observer.Wait(); 533 observer.Wait();
534 EXPECT_EQ(url, contents->GetController().GetLastCommittedEntry()->GetURL()); 534 EXPECT_EQ(url, contents->GetController().GetLastCommittedEntry()->GetURL());
535 } 535 }
536 536
537 ExtensionHost* ExtensionBrowserTest::FindHostWithPath( 537 extensions::ExtensionHost* ExtensionBrowserTest::FindHostWithPath(
538 ExtensionProcessManager* manager, 538 ExtensionProcessManager* manager,
539 const std::string& path, 539 const std::string& path,
540 int expected_hosts) { 540 int expected_hosts) {
541 ExtensionHost* host = NULL; 541 extensions::ExtensionHost* host = NULL;
542 int num_hosts = 0; 542 int num_hosts = 0;
543 ExtensionProcessManager::ExtensionHostSet background_hosts = 543 ExtensionProcessManager::ExtensionHostSet background_hosts =
544 manager->background_hosts(); 544 manager->background_hosts();
545 for (ExtensionProcessManager::const_iterator iter = background_hosts.begin(); 545 for (ExtensionProcessManager::const_iterator iter = background_hosts.begin();
546 iter != background_hosts.end(); ++iter) { 546 iter != background_hosts.end(); ++iter) {
547 if ((*iter)->GetURL().path() == path) { 547 if ((*iter)->GetURL().path() == path) {
548 EXPECT_FALSE(host); 548 EXPECT_FALSE(host);
549 host = *iter; 549 host = *iter;
550 } 550 }
551 num_hosts++; 551 num_hosts++;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 case content::NOTIFICATION_LOAD_STOP: 632 case content::NOTIFICATION_LOAD_STOP:
633 VLOG(1) << "Got LOAD_STOP notification."; 633 VLOG(1) << "Got LOAD_STOP notification.";
634 MessageLoopForUI::current()->Quit(); 634 MessageLoopForUI::current()->Quit();
635 break; 635 break;
636 636
637 default: 637 default:
638 NOTREACHED(); 638 NOTREACHED();
639 break; 639 break;
640 } 640 }
641 } 641 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.h ('k') | chrome/browser/extensions/extension_crash_recovery_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698