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

Side by Side Diff: content/browser/loader/offline_policy_unittest.cc

Issue 20003004: reland crrev.com/212927 Move webkitplatformsupport_impl and related from glue to child (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & allocator dep for components_unittests in shared_library2 Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/browser/loader/offline_policy.h" 5 #include "content/browser/loader/offline_policy.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/public/common/content_switches.h" 8 #include "content/public/common/content_switches.h"
9 #include "net/base/load_flags.h" 9 #include "net/base/load_flags.h"
10 #include "net/http/http_response_info.h" 10 #include "net/http/http_response_info.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "webkit/glue/resource_type.h" 12 #include "webkit/common/resource_type.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 class OfflinePolicyTest : public testing::Test { 16 class OfflinePolicyTest : public testing::Test {
17 protected: 17 protected:
18 virtual void SetUp() { 18 virtual void SetUp() {
19 CommandLine::ForCurrentProcess()->AppendSwitch( 19 CommandLine::ForCurrentProcess()->AppendSwitch(
20 switches::kEnableOfflineCacheAccess); 20 switches::kEnableOfflineCacheAccess);
21 policy_ = new OfflinePolicy; 21 policy_ = new OfflinePolicy;
22 } 22 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Cache related flags inhibit the returning of any special flags. 87 // Cache related flags inhibit the returning of any special flags.
88 TEST_F(OfflinePolicyTest, ConsumerFlagOverride) { 88 TEST_F(OfflinePolicyTest, ConsumerFlagOverride) {
89 EXPECT_EQ(0, policy_->GetAdditionalLoadFlags(net::LOAD_BYPASS_CACHE, true)); 89 EXPECT_EQ(0, policy_->GetAdditionalLoadFlags(net::LOAD_BYPASS_CACHE, true));
90 net::HttpResponseInfo response_info; 90 net::HttpResponseInfo response_info;
91 response_info.server_data_unavailable = true; 91 response_info.server_data_unavailable = true;
92 policy_->UpdateStateForSuccessfullyStartedRequest(response_info); 92 policy_->UpdateStateForSuccessfullyStartedRequest(response_info);
93 EXPECT_EQ(0, policy_->GetAdditionalLoadFlags(net::LOAD_BYPASS_CACHE, false)); 93 EXPECT_EQ(0, policy_->GetAdditionalLoadFlags(net::LOAD_BYPASS_CACHE, false));
94 } 94 }
95 95
96 } 96 }
OLDNEW
« no previous file with comments | « content/browser/child_process_security_policy_impl.h ('k') | content/browser/loader/resource_dispatcher_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698