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

Side by Side Diff: content/test/fuzzer/renderer_tree_fuzzer.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: 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
« no previous file with comments | « content/renderer/gpu/actions_parser.cc ('k') | dbus/values_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // Fuzzer for content/renderer 5 // Fuzzer for content/renderer
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <memory> 10 #include <memory>
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 AttrPosition PickRandomAttribute(Random* rnd); 151 AttrPosition PickRandomAttribute(Random* rnd);
152 152
153 void ParseJson(const base::Value& value) { 153 void ParseJson(const base::Value& value) {
154 const base::ListValue* list; 154 const base::ListValue* list;
155 if (!value.GetAsList(&list)) { 155 if (!value.GetAsList(&list)) {
156 return; 156 return;
157 } 157 }
158 158
159 for (const auto& listItem : *list) { 159 for (const auto& listItem : *list) {
160 std::unique_ptr<Node> node(Node::ParseJson(listItem)); 160 std::unique_ptr<Node> node(Node::ParseJson(*listItem));
161 if (node) { 161 if (node) {
162 push_back(std::move(node)); 162 push_back(std::move(node));
163 } 163 }
164 } 164 }
165 } 165 }
166 166
167 private: 167 private:
168 friend class Element; 168 friend class Element;
169 169
170 DISALLOW_COPY_AND_ASSIGN(NodeList); 170 DISALLOW_COPY_AND_ASSIGN(NodeList);
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 586
587 auto nodes = NodeList::ParseJsonString(data, size); 587 auto nodes = NodeList::ParseJsonString(data, size);
588 std::string html; 588 std::string html;
589 nodes->WriteHtml(&html); 589 nodes->WriteHtml(&html);
590 590
591 env->adapter->LoadHTML(html, "http://www.example.org"); 591 env->adapter->LoadHTML(html, "http://www.example.org");
592 return 0; 592 return 0;
593 } 593 }
594 594
595 } // namespace content 595 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/actions_parser.cc ('k') | dbus/values_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698