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

Side by Side Diff: content/browser/service_worker/service_worker_browsertest.cc

Issue 2819493002: [Test] Move DelegatedFrameEvictor into components -public_deps (Closed)
Patch Set: use if null instead of feature Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/base_features.h"
12 #include "base/bind.h" 13 #include "base/bind.h"
13 #include "base/callback.h" 14 #include "base/callback.h"
14 #include "base/command_line.h" 15 #include "base/command_line.h"
15 #include "base/json/json_reader.h" 16 #include "base/json/json_reader.h"
16 #include "base/macros.h" 17 #include "base/macros.h"
17 #include "base/memory/ptr_util.h" 18 #include "base/memory/ptr_util.h"
18 #include "base/memory/ref_counted.h" 19 #include "base/memory/ref_counted.h"
19 #include "base/run_loop.h" 20 #include "base/run_loop.h"
20 #include "base/single_thread_task_runner.h" 21 #include "base/single_thread_task_runner.h"
21 #include "base/strings/string16.h" 22 #include "base/strings/string16.h"
(...skipping 2853 matching lines...) Expand 10 before | Expand all | Expand 10 after
2875 RegisterServiceWorkerOnCrossOriginServer(kScopeUrl, kWorkerUrl); 2876 RegisterServiceWorkerOnCrossOriginServer(kScopeUrl, kWorkerUrl);
2876 RunTestWithCrossOriginURL(kPageUrl, kScopeUrl); 2877 RunTestWithCrossOriginURL(kPageUrl, kScopeUrl);
2877 } 2878 }
2878 2879
2879 class MemoryCoordinatorWithServiceWorkerTest 2880 class MemoryCoordinatorWithServiceWorkerTest
2880 : public ServiceWorkerVersionBrowserTest { 2881 : public ServiceWorkerVersionBrowserTest {
2881 public: 2882 public:
2882 MemoryCoordinatorWithServiceWorkerTest() {} 2883 MemoryCoordinatorWithServiceWorkerTest() {}
2883 2884
2884 void SetUp() override { 2885 void SetUp() override {
2885 scoped_feature_list_.InitAndEnableFeature(features::kMemoryCoordinator); 2886 scoped_feature_list_.InitAndEnableFeature(
2887 base::features::kMemoryCoordinator);
2886 ServiceWorkerVersionBrowserTest::SetUp(); 2888 ServiceWorkerVersionBrowserTest::SetUp();
2887 } 2889 }
2888 2890
2889 private: 2891 private:
2890 base::test::ScopedFeatureList scoped_feature_list_; 2892 base::test::ScopedFeatureList scoped_feature_list_;
2891 2893
2892 DISALLOW_COPY_AND_ASSIGN(MemoryCoordinatorWithServiceWorkerTest); 2894 DISALLOW_COPY_AND_ASSIGN(MemoryCoordinatorWithServiceWorkerTest);
2893 }; 2895 };
2894 2896
2895 class TestMemoryCoordinatorDelegate : public MemoryCoordinatorDelegate { 2897 class TestMemoryCoordinatorDelegate : public MemoryCoordinatorDelegate {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2934 // effect in CanSuspendRenderer(). 2936 // effect in CanSuspendRenderer().
2935 shell()->web_contents()->WasHidden(); 2937 shell()->web_contents()->WasHidden();
2936 EXPECT_TRUE(rph->IsProcessBackgrounded()); 2938 EXPECT_TRUE(rph->IsProcessBackgrounded());
2937 2939
2938 // The process which has service worker thread shouldn't be suspended. 2940 // The process which has service worker thread shouldn't be suspended.
2939 EXPECT_FALSE(memory_coordinator->CanSuspendRenderer(render_process_id)); 2941 EXPECT_FALSE(memory_coordinator->CanSuspendRenderer(render_process_id));
2940 } 2942 }
2941 #endif 2943 #endif
2942 2944
2943 } // namespace content 2945 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/renderer_frame_manager.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698