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

Side by Side Diff: third_party/WebKit/Source/web/tests/MHTMLTest.cpp

Issue 2867693003: Changed PassRefPtr templated copy constructor to move constructor. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/platform/wtf/PassRefPtr.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 void LoadURLInTopFrame(const WebURL& url) { 105 void LoadURLInTopFrame(const WebURL& url) {
106 FrameTestHelpers::LoadFrame(helper_.WebView()->MainFrame(), 106 FrameTestHelpers::LoadFrame(helper_.WebView()->MainFrame(),
107 url.GetString().Utf8().data()); 107 url.GetString().Utf8().data());
108 } 108 }
109 109
110 Page* GetPage() const { return helper_.WebView()->GetPage(); } 110 Page* GetPage() const { return helper_.WebView()->GetPage(); }
111 111
112 void AddResource(const char* url, 112 void AddResource(const char* url,
113 const char* mime, 113 const char* mime,
114 PassRefPtr<SharedBuffer> data) { 114 PassRefPtr<SharedBuffer> data) {
115 SerializedResource resource(ToKURL(url), mime, data); 115 SerializedResource resource(ToKURL(url), mime, std::move(data));
116 resources_.push_back(resource); 116 resources_.push_back(resource);
117 } 117 }
118 118
119 void AddResource(const char* url, const char* mime, const char* file_name) { 119 void AddResource(const char* url, const char* mime, const char* file_name) {
120 AddResource(url, mime, ReadFile(file_name)); 120 AddResource(url, mime, ReadFile(file_name));
121 } 121 }
122 122
123 void AddTestResources() { 123 void AddTestResources() {
124 AddResource("http://www.test.com", "text/html", "css_test_page.html"); 124 AddResource("http://www.test.com", "text/html", "css_test_page.html");
125 AddResource("http://www.test.com/link_styles.css", "text/css", 125 AddResource("http://www.test.com/link_styles.css", "text/css",
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 kSandboxPropagatesToAuxiliaryBrowsingContexts), 291 kSandboxPropagatesToAuxiliaryBrowsingContexts),
292 document->GetSandboxFlags()); 292 document->GetSandboxFlags());
293 293
294 // MHTML document should be loaded into unique origin. 294 // MHTML document should be loaded into unique origin.
295 EXPECT_TRUE(document->GetSecurityOrigin()->IsUnique()); 295 EXPECT_TRUE(document->GetSecurityOrigin()->IsUnique());
296 // Script execution should be disabled. 296 // Script execution should be disabled.
297 EXPECT_FALSE(document->CanExecuteScripts(kNotAboutToExecuteScript)); 297 EXPECT_FALSE(document->CanExecuteScripts(kNotAboutToExecuteScript));
298 } 298 }
299 299
300 } // namespace blink 300 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/wtf/PassRefPtr.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698