OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |