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/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 content::Source<extensions::CrxInstaller>(installer.get())); | 539 content::Source<extensions::CrxInstaller>(installer.get())); |
540 | 540 |
541 installer->InstallCrx(crx_path); | 541 installer->InstallCrx(crx_path); |
542 | 542 |
543 observer_->Wait(); | 543 observer_->Wait(); |
544 } | 544 } |
545 | 545 |
546 size_t num_after = registry->enabled_extensions().size(); | 546 size_t num_after = registry->enabled_extensions().size(); |
547 EXPECT_EQ(num_before + expected_change, num_after); | 547 EXPECT_EQ(num_before + expected_change, num_after); |
548 if (num_before + expected_change != num_after) { | 548 if (num_before + expected_change != num_after) { |
549 VLOG(1) << "Num extensions before: " << base::IntToString(num_before) | 549 VLOG(1) << "Num extensions before: " << base::SizeTToString(num_before) |
550 << " num after: " << base::IntToString(num_after) | 550 << " num after: " << base::SizeTToString(num_after) |
551 << " Installed extensions follow:"; | 551 << " Installed extensions follow:"; |
552 | 552 |
553 for (const scoped_refptr<const Extension>& extension : | 553 for (const scoped_refptr<const Extension>& extension : |
554 registry->enabled_extensions()) | 554 registry->enabled_extensions()) |
555 VLOG(1) << " " << extension->id(); | 555 VLOG(1) << " " << extension->id(); |
556 | 556 |
557 VLOG(1) << "Errors follow:"; | 557 VLOG(1) << "Errors follow:"; |
558 const std::vector<base::string16>* errors = | 558 const std::vector<base::string16>* errors = |
559 ExtensionErrorReporter::GetInstance()->GetErrors(); | 559 ExtensionErrorReporter::GetInstance()->GetErrors(); |
560 for (std::vector<base::string16>::const_iterator iter = errors->begin(); | 560 for (std::vector<base::string16>::const_iterator iter = errors->begin(); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( | 682 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( |
683 profile(), extension_id, script); | 683 profile(), extension_id, script); |
684 } | 684 } |
685 | 685 |
686 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( | 686 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( |
687 const std::string& extension_id, | 687 const std::string& extension_id, |
688 const std::string& script) { | 688 const std::string& script) { |
689 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( | 689 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( |
690 profile(), extension_id, script); | 690 profile(), extension_id, script); |
691 } | 691 } |
OLD | NEW |