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

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

Issue 573843002: Allows webview to access extension resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Forgot to add the namespace on chrome_url_request_util.cc Created 6 years, 3 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 <string> 5 #include <string>
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 Extension::Create(path, Manifest::UNPACKED, manifest, 86 Extension::Create(path, Manifest::UNPACKED, manifest,
87 Extension::NO_FLAGS, &error)); 87 Extension::NO_FLAGS, &error));
88 EXPECT_TRUE(extension.get()) << error; 88 EXPECT_TRUE(extension.get()) << error;
89 return extension; 89 return extension;
90 } 90 }
91 91
92 } // namespace 92 } // namespace
93 93
94 // This test lives in src/chrome instead of src/extensions because it tests 94 // This test lives in src/chrome instead of src/extensions because it tests
95 // functionality delegated back to Chrome via ChromeExtensionsBrowserClient. 95 // functionality delegated back to Chrome via ChromeExtensionsBrowserClient.
96 // See chrome/browser/extensions/url_request_util.cc. 96 // See chrome/browser/extensions/chrome_url_request_util.cc.
97 class ExtensionProtocolTest : public testing::Test { 97 class ExtensionProtocolTest : public testing::Test {
98 public: 98 public:
99 ExtensionProtocolTest() 99 ExtensionProtocolTest()
100 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP), 100 : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
101 old_factory_(NULL), 101 old_factory_(NULL),
102 resource_context_(&test_url_request_context_) {} 102 resource_context_(&test_url_request_context_) {}
103 103
104 virtual void SetUp() OVERRIDE { 104 virtual void SetUp() OVERRIDE {
105 testing::Test::SetUp(); 105 testing::Test::SetUp();
106 extension_info_map_ = new InfoMap(); 106 extension_info_map_ = new InfoMap();
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 extension->GetResourceURL("test.dat"), 355 extension->GetResourceURL("test.dat"),
356 net::DEFAULT_PRIORITY, 356 net::DEFAULT_PRIORITY,
357 &test_delegate_, 357 &test_delegate_,
358 NULL)); 358 NULL));
359 StartRequest(request.get(), content::RESOURCE_TYPE_MEDIA); 359 StartRequest(request.get(), content::RESOURCE_TYPE_MEDIA);
360 EXPECT_EQ(net::URLRequestStatus::FAILED, request->status().status()); 360 EXPECT_EQ(net::URLRequestStatus::FAILED, request->status().status());
361 } 361 }
362 } 362 }
363 363
364 } // namespace extensions 364 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/chrome_url_request_util.cc ('k') | chrome/browser/extensions/url_request_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698