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

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

Issue 624153002: replace OVERRIDE and FINAL with override and final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 "base/path_service.h" 5 #include "base/path_service.h"
6 #include "base/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/background/background_contents_service.h" 8 #include "chrome/browser/background/background_contents_service.h"
9 #include "chrome/browser/background/background_contents_service_factory.h" 9 #include "chrome/browser/background/background_contents_service_factory.h"
10 #include "chrome/browser/background/background_mode_manager.h" 10 #include "chrome/browser/background/background_mode_manager.h"
(...skipping 24 matching lines...) Expand all
35 35
36 #if defined(OS_MACOSX) 36 #if defined(OS_MACOSX)
37 #include "base/mac/scoped_nsautorelease_pool.h" 37 #include "base/mac/scoped_nsautorelease_pool.h"
38 #endif 38 #endif
39 39
40 using base::ASCIIToUTF16; 40 using base::ASCIIToUTF16;
41 using extensions::Extension; 41 using extensions::Extension;
42 42
43 class AppBackgroundPageApiTest : public ExtensionApiTest { 43 class AppBackgroundPageApiTest : public ExtensionApiTest {
44 public: 44 public:
45 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 45 virtual void SetUpCommandLine(CommandLine* command_line) override {
46 ExtensionApiTest::SetUpCommandLine(command_line); 46 ExtensionApiTest::SetUpCommandLine(command_line);
47 command_line->AppendSwitch(switches::kDisablePopupBlocking); 47 command_line->AppendSwitch(switches::kDisablePopupBlocking);
48 command_line->AppendSwitch(extensions::switches::kAllowHTTPBackgroundPage); 48 command_line->AppendSwitch(extensions::switches::kAllowHTTPBackgroundPage);
49 } 49 }
50 50
51 bool CreateApp(const std::string& app_manifest, 51 bool CreateApp(const std::string& app_manifest,
52 base::FilePath* app_dir) { 52 base::FilePath* app_dir) {
53 if (!app_dir_.CreateUniqueTempDir()) { 53 if (!app_dir_.CreateUniqueTempDir()) {
54 LOG(ERROR) << "Unable to create a temporary directory."; 54 LOG(ERROR) << "Unable to create a temporary directory.";
55 return false; 55 return false;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 // Fixture to assist in testing v2 app background pages containing 123 // Fixture to assist in testing v2 app background pages containing
124 // Native Client embeds. 124 // Native Client embeds.
125 class AppBackgroundPageNaClTest : public AppBackgroundPageApiTest { 125 class AppBackgroundPageNaClTest : public AppBackgroundPageApiTest {
126 public: 126 public:
127 AppBackgroundPageNaClTest() 127 AppBackgroundPageNaClTest()
128 : extension_(NULL) {} 128 : extension_(NULL) {}
129 virtual ~AppBackgroundPageNaClTest() { 129 virtual ~AppBackgroundPageNaClTest() {
130 } 130 }
131 131
132 virtual void SetUpOnMainThread() OVERRIDE { 132 virtual void SetUpOnMainThread() override {
133 AppBackgroundPageApiTest::SetUpOnMainThread(); 133 AppBackgroundPageApiTest::SetUpOnMainThread();
134 #if !defined(DISABLE_NACL) 134 #if !defined(DISABLE_NACL)
135 nacl::NaClProcessHost::SetPpapiKeepAliveThrottleForTesting(50); 135 nacl::NaClProcessHost::SetPpapiKeepAliveThrottleForTesting(50);
136 #endif 136 #endif
137 extensions::ProcessManager::SetEventPageIdleTimeForTesting(1000); 137 extensions::ProcessManager::SetEventPageIdleTimeForTesting(1000);
138 extensions::ProcessManager::SetEventPageSuspendingTimeForTesting(1000); 138 extensions::ProcessManager::SetEventPageSuspendingTimeForTesting(1000);
139 } 139 }
140 140
141 const Extension* extension() { return extension_; } 141 const Extension* extension() { return extension_; }
142 142
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 extensions::ExtensionSystem::Get(browser()->profile())->process_manager(); 643 extensions::ExtensionSystem::Get(browser()->profile())->process_manager();
644 ImpulseCallbackCounter idle_impulse_counter(manager, extension()->id()); 644 ImpulseCallbackCounter idle_impulse_counter(manager, extension()->id());
645 EXPECT_TRUE(nacl_modules_loaded.WaitUntilSatisfied()); 645 EXPECT_TRUE(nacl_modules_loaded.WaitUntilSatisfied());
646 646
647 manager->SetKeepaliveImpulseDecrementCallbackForTesting( 647 manager->SetKeepaliveImpulseDecrementCallbackForTesting(
648 idle_impulse_counter.SetGoalAndGetCallback(1)); 648 idle_impulse_counter.SetGoalAndGetCallback(1));
649 nacl_modules_loaded.Reply("be idle"); 649 nacl_modules_loaded.Reply("be idle");
650 idle_impulse_counter.Wait(); 650 idle_impulse_counter.Wait();
651 #endif 651 #endif
652 } 652 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698